summary refs log tree commit diff
diff options
context:
space:
mode:
authorfranck cuny <franck@lumberjaph.net>2010-11-26 15:37:14 +0100
committerfranck cuny <franck@lumberjaph.net>2010-11-26 15:37:14 +0100
commitd150505fcdf7776c9f47f941c3a299706a2b95d0 (patch)
tree037982d31f9ef768571411de7a4776f78a02a5ae
parentupdate Changes (diff)
downloadnet-http-spore-d150505fcdf7776c9f47f941c3a299706a2b95d0.tar.gz
need to rewrite this
-rw-r--r--lib/Net/HTTP/Spore/Role/Middleware.pm5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Net/HTTP/Spore/Role/Middleware.pm b/lib/Net/HTTP/Spore/Role/Middleware.pm
index 60f4703..d1a97e2 100644
--- a/lib/Net/HTTP/Spore/Role/Middleware.pm
+++ b/lib/Net/HTTP/Spore/Role/Middleware.pm
@@ -24,7 +24,10 @@ sub _load_middleware {
 sub _complete_mw_name {
     my ($self, $mw) = @_;
 
-    if ($mw !~ /(?:^\+|Net\:\:HTTP\:\:Spore\:\:Middleware)/) {
+    if ($mw =~ /^\+/) {
+        $mw =~ s/^\+//;
+    }
+    elsif ($mw !~ /Net\:\:HTTP\:\:Spore\:\:Middleware/) {
         $mw = "Net::HTTP::Spore::Middleware::".$mw;
     }