develooper Front page | perl.perl5.changes | Postings from March 2018

[perl.git] branch blead updated. v5.27.9-112-g74e28a4a73

From:
Tony Cook
Date:
March 6, 2018 04:08
Subject:
[perl.git] branch blead updated. v5.27.9-112-g74e28a4a73
Message ID:
E1et3tQ-00021j-S2@git.dc.perl.space
In perl.git, the branch blead has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/74e28a4a737c72840f2576bed7ebacf4a288760e?hp=c0221e16334efbe9723722578949dc3916d669d4>

- Log -----------------------------------------------------------------
commit 74e28a4a737c72840f2576bed7ebacf4a288760e
Author: Tony Cook <tony@develop-help.com>
Date:   Thu Mar 1 15:42:56 2018 +1100

    (perl #132925) don't use $0 to get the name of mk_invlists.pl
    
    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.

commit b857191d01c23df63dc1112e443b194a13305179
Author: Tony Cook <tony@develop-help.com>
Date:   Thu Mar 1 15:26:22 2018 +1100

    (perl #132925) correct path handling in mktables
    
    the lexical my $file inside the loop masked the for loop $file,
    wasting the work done to canonicalize the path names.
    
    The grep on length is required since splitdir() can return empty
    strings.

-----------------------------------------------------------------------

Summary of changes:
 charclass_invlists.h |  4 ++--
 lib/unicore/mktables |  6 +++---
 regcharclass.h       |  2 +-
 regen/mk_invlists.pl | 11 ++++++-----
 4 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/charclass_invlists.h b/charclass_invlists.h
index 72f91e397a..6adcb56c99 100644
--- a/charclass_invlists.h
+++ b/charclass_invlists.h
@@ -109534,8 +109534,8 @@ static const U8 WB_table[24][24] = {
  * be0f129691d479aa38646e4ca0ec1ee576ae7f75b0300a5624a7fa862fa8abba lib/unicore/extracted/DLineBreak.txt
  * 92449d354d9f6b6f2f97a292ebb59f6344ffdeb83d120d7d23e569c43ba67cd5 lib/unicore/extracted/DNumType.txt
  * e3a319527153b0c6c0c549b40fc6f3a01a7a0dcd6620784391db25901df3b154 lib/unicore/extracted/DNumValues.txt
- * 5671c3de473b25e7ea47097e4906260624dfabe3e9b1739f490aecbc3d858459 lib/unicore/mktables
+ * 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: */
diff --git a/lib/unicore/mktables b/lib/unicore/mktables
index c6436723d5..88d9c036a3 100644
--- a/lib/unicore/mktables
+++ b/lib/unicore/mktables
@@ -20230,9 +20230,9 @@ if ( $file_list and $make_list ) {
 
     print "Updating '$file_list'\n" if $verbosity >= $PROGRESS;
     foreach my $file (@input_files, @files_actually_output) {
-        my (undef, $directories, $file) = File::Spec->splitpath($file);
-        my @directories = File::Spec->splitdir($directories);
-        $file = join '/', @directories, $file;
+        my (undef, $directories, $basefile) = File::Spec->splitpath($file);
+        my @directories = grep length, File::Spec->splitdir($directories);
+        $file = join '/', @directories, $basefile;
     }
 
     my $ofh;
diff --git a/regcharclass.h b/regcharclass.h
index 36c9d5e72d..c34f2ad13e 100644
--- a/regcharclass.h
+++ b/regcharclass.h
@@ -1898,7 +1898,7 @@
  * be0f129691d479aa38646e4ca0ec1ee576ae7f75b0300a5624a7fa862fa8abba lib/unicore/extracted/DLineBreak.txt
  * 92449d354d9f6b6f2f97a292ebb59f6344ffdeb83d120d7d23e569c43ba67cd5 lib/unicore/extracted/DNumType.txt
  * e3a319527153b0c6c0c549b40fc6f3a01a7a0dcd6620784391db25901df3b154 lib/unicore/extracted/DNumValues.txt
- * 5671c3de473b25e7ea47097e4906260624dfabe3e9b1739f490aecbc3d858459 lib/unicore/mktables
+ * 823b41f276979dd5e2df12f0c7339f3d1aa2c805848958f31ddc549cb11bed9f lib/unicore/mktables
  * 21653d2744fdd071f9ef138c805393901bb9547cf3e777ebf50215a191f986ea lib/unicore/version
  * 913d2f93f3cb6cdf1664db888bf840bc4eb074eef824e082fceda24a9445e60c regen/charset_translations.pl
  * 9ea6338945a7d70e5ea4b31ac7856c0b521df96be002e94b4b3b7d31debbf3ab regen/regcharclass.pl
diff --git a/regen/mk_invlists.pl b/regen/mk_invlists.pl
index 00b929eec7..de9adf73c4 100644
--- a/regen/mk_invlists.pl
+++ b/regen/mk_invlists.pl
@@ -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.

-- 
Perl5 Master Repository



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About