From ed131e4112640c781865aad216cb3c424e5d2ab9 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Mon, 5 Sep 2011 18:50:34 -0500 Subject: don't allow invalid package names --- lib/Package/Stash/PP.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Package/Stash/PP.pm') 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, -- cgit v1.2.3-54-g00ecf