projects
/
gitmo/Moose.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
c0c1cd8
)
Escape any metacharacters in the anon prefix before using it in a regex
Dave Rolsky [Wed, 20 Apr 2011 15:50:48 +0000 (10:50 -0500)]
lib/Class/MOP/Package.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/Class/MOP/Package.pm
b/lib/Class/MOP/Package.pm
index
d3930ff
..
92e555e
100644
(file)
--- a/
lib/Class/MOP/Package.pm
+++ b/
lib/Class/MOP/Package.pm
@@
-89,7
+89,7
@@
sub create {
my $self = shift;
no warnings 'uninitialized';
my $prefix = $self->_anon_package_prefix;
- $self->name =~ /^$prefix/;
+ $self->name =~ /^\Q$prefix/;
}
sub create_anon {