diff options
author | Karl Williamson <public@khwilliamson.com> | 2013-01-04 11:04:08 -0700 |
---|---|---|
committer | Karl Williamson <public@khwilliamson.com> | 2013-01-04 13:08:21 -0700 |
commit | 695481e210e60cbb90817302c3e904667987e9e2 (patch) | |
tree | ab435f9b0c9b8bbbd129b4f1a2b3a2334529a458 | |
parent | 013b94b66f846de7fc0e23900aac69629d40b881 (diff) | |
download | perl-695481e210e60cbb90817302c3e904667987e9e2.tar.gz |
charnames: Enforce better file name rules
The code says that identifier syntax is required for a file name, but
the code accepted any sequence of \w's.
-rw-r--r-- | lib/_charnames.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/_charnames.pm b/lib/_charnames.pm index 7f2e5f76c3..4a8aa42aac 100644 --- 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 { |