This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
013b94b
)
charnames: Enforce better file name rules
author
Karl Williamson
<public@khwilliamson.com>
Fri, 4 Jan 2013 18:04:08 +0000
(11:04 -0700)
committer
Karl Williamson
<public@khwilliamson.com>
Fri, 4 Jan 2013 20:08:21 +0000
(13:08 -0700)
The code says that identifier syntax is required for a file name, but
the code accepted any sequence of \w's.
lib/_charnames.pm
patch
|
blob
|
blame
|
history
diff --git
a/lib/_charnames.pm
b/lib/_charnames.pm
index
7f2e5f7
..
4a8aa42
100644
(file)
--- a/
lib/_charnames.pm
+++ b/
lib/_charnames.pm
@@
-214,7
+214,7
@@
sub alias_file ($) # Reads a file containing alias definitions
if (-f $arg && File::Spec->file_name_is_absolute ($arg)) {
$file = $arg;
}
- elsif ($arg =~ m/
^\w+$/
) {
+ elsif ($arg =~ m/
^ \p{_Perl_IDStart} \p{_Perl_IDCont}* $/x
) {
$file = "unicore/${arg}_alias.pl";
}
else {