tests, and make this actually work
[gitmo/Package-Stash.git] / lib / Package / Stash / PP.pm
index 408f3be..247a3b8 100644 (file)
@@ -40,7 +40,7 @@ sub new {
               . "currently support anonymous stashes. You should install "
               . "Package::Stash::XS";
     }
-    elsif ($package !~ /[0-9A-Z_a-z]+(?:::[0-9A-Z_a-z]+)*/) {
+    elsif ($package !~ /\A[0-9A-Z_a-z]+(?:::[0-9A-Z_a-z]+)*\z/) {
         confess "$package is not a module name";
     }