This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
charnames: Enforce better file name rules
[perl5.git] / lib / _charnames.pm
index 7f2e5f7..4a8aa42 100644 (file)
@@ -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 {