diff options
author | Jesse Luehrs <doy@tozt.net> | 2011-09-05 18:50:34 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2011-09-05 19:53:59 -0500 |
commit | ed131e4112640c781865aad216cb3c424e5d2ab9 (patch) | |
tree | 5dfb0b53a5b03ad0d95447ddd0cce2fb73f7d90c /lib | |
parent | 0352cb15b14788d4e2a1badb0d0bb3a34f4d58d8 (diff) | |
download | package-stash-ed131e4112640c781865aad216cb3c424e5d2ab9.tar.gz package-stash-ed131e4112640c781865aad216cb3c424e5d2ab9.zip |
don't allow invalid package names
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Package/Stash/PP.pm | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Package/Stash/PP.pm b/lib/Package/Stash/PP.pm index 227970a..b3e3a7d 100644 --- a/lib/Package/Stash/PP.pm +++ b/lib/Package/Stash/PP.pm @@ -40,6 +40,9 @@ sub new { . "currently support anonymous stashes. You should install " . "Package::Stash::XS"; } + elsif ($package !~ /[0-9A-Z_a-z]+(?:::[0-9A-Z_a-z]+)*/) { + confess "$package is not a module name"; + } return bless { 'package' => $package, |