This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix bug when $exclusions_file is specified in .package file
authorAaron Crane <arc@cpan.org>
Thu, 25 Apr 2019 09:40:44 +0000 (10:40 +0100)
committerAaron Crane <arc@cpan.org>
Thu, 25 Apr 2019 09:40:44 +0000 (10:40 +0100)
The actual programs were trying to load the exclusions file before reading
.package (or even, in one case, without trying to read it at all). I failed
to notice this because I had a "-X" option that duplicated the intended use
of the setting in my .package file.

bin/mconfig
bin/metaxref

index 453235c..8783d13 100755 (executable)
@@ -59,8 +59,6 @@ chop($date = `date`);
 &profile;                                              # Read ~/.dist_profile
 &usage unless getopts("dhkmoOstvwGMVL:X:");
 
-my %excluded_symbol;
-read_exclusions($opt_X);
 $MC = $opt_L if $opt_L;                        # May override public library path
 $MC = &tilda_expand($MC);              # ~name expansion
 chop($WD = `pwd`);                             # Working directory
@@ -82,6 +80,8 @@ unlink 'Wanted' unless $opt_w;                        # Wanted rebuilt if no -w
 unlink 'Obsolete' unless $opt_w;               # Obsolete file rebuilt if no -w
 &readpackage;                                                  # Merely get the package's name
 &init;                                                                 # Various initializations
+my %excluded_symbol;
+read_exclusions($opt_X);                               # Load -X or .package equivalent
 `mkdir .MT 2>&1` unless -d '.MT';              # For private temporary files
 
 &locate_units;                         # Fill in @ARGV with a unit list
index ad952f5..a37a320 100755 (executable)
@@ -65,7 +65,10 @@ if ($opt_V) {
 
 $NEWMANI = $opt_f || (-f 'MANIFEST.new' ? 'MANIFEST.new' : 'MANIFEST');
 
+&readpackage;                                                  # Merely get the package's name
 &init;                                                                 # Various initializations
+my %excluded_symbol;
+read_exclusions($opt_X);                               # Load -X or .package equivalent
 `mkdir .MT 2>&1` unless -d '.MT';              # For private temporary files
 unlink 'Obsolete';                                             # Obsolete file rebuilt