This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #132925) don't use $0 to get the name of mk_invlists.pl
authorTony Cook <tony@develop-help.com>
Thu, 1 Mar 2018 04:42:56 +0000 (15:42 +1100)
committerTony Cook <tony@develop-help.com>
Tue, 6 Mar 2018 03:56:35 +0000 (14:56 +1100)
Other regen scripts simply embed the name as a literal, using $0
means that the output varies depending on the path used to call
regen/mk_invlists.pl.

charclass_invlists.h
regen/mk_invlists.pl

index d7ab904..6adcb56 100644 (file)
@@ -109537,5 +109537,5 @@ static const U8 WB_table[24][24] = {
  * 823b41f276979dd5e2df12f0c7339f3d1aa2c805848958f31ddc549cb11bed9f lib/unicore/mktables
  * 21653d2744fdd071f9ef138c805393901bb9547cf3e777ebf50215a191f986ea lib/unicore/version
  * 913d2f93f3cb6cdf1664db888bf840bc4eb074eef824e082fceda24a9445e60c regen/charset_translations.pl
- * ddcc2a146f5202e3fb5fa448eded5e53b49db82e436a742ca37b8cee15179148 regen/mk_invlists.pl
+ * 320fca42ad27e06f90c9ea242cd22d7fcf9ccfde7d21a3a0eda01b3c13ad25e2 regen/mk_invlists.pl
  * ex: set ro: */
index 00b929e..de9adf7 100644 (file)
@@ -36,7 +36,7 @@ my $numeric_re = qr/ ^ -? \d+ (:? \. \d+ )? $ /ax;
 my $enum_name_re = qr / ^ [[:alpha:]] \w* $ /ax;
 
 my $out_fh = open_new('charclass_invlists.h', '>',
-                     {style => '*', by => $0,
+                     {style => '*', by => 'regen/mk_invlists.pl',
                       from => "Unicode::UCD"});
 
 my $in_file_pound_if = 0;
@@ -2235,10 +2235,11 @@ output_WB_table();
 end_file_pound_if;
 
 my $sources_list = "lib/unicore/mktables.lst";
-my @sources = ($0, qw(lib/unicore/mktables
-                      lib/Unicode/UCD.pm
-                      regen/charset_translations.pl
-                      ));
+my @sources = qw(regen/mk_invlists.pl
+                 lib/unicore/mktables
+                 lib/Unicode/UCD.pm
+                 regen/charset_translations.pl
+               );
 {
     # Depend on mktables’ own sources.  It’s a shorter list of files than
     # those that Unicode::UCD uses.