projects
/
gitmo/Package-Stash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
0352cb1
)
don't allow invalid package names
Jesse Luehrs [Mon, 5 Sep 2011 23:50:34 +0000 (18:50 -0500)]
Changes
patch
|
blob
|
blame
|
history
lib/Package/Stash/PP.pm
patch
|
blob
|
blame
|
history
diff --git
a/Changes
b/Changes
index
c45f4a6
..
2e96f70
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-3,6
+3,7
@@
Revision history for Package-Stash
{{$NEXT}}
- bring the behavior of has_symbol for nonexistant scalars into line with
the xs version
+ - invalid package names (for instance, Foo:Bar) are not allowed
0.31 2011-08-08
- fix ->add_symbol('$foo', qr/sdlfk/) on 5.12+
diff --git
a/lib/Package/Stash/PP.pm
b/lib/Package/Stash/PP.pm
index
227970a
..
b3e3a7d
100644
(file)
--- 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,