From 519d6ef44c5b1626080a4ec979f2b646709fc93e Mon Sep 17 00:00:00 2001 From: Justin Davis Date: Fri, 1 Jun 2012 23:51:05 -0400 Subject: Fix perlcore to work properly. Mark core-only modules. Find every module, not just the main module in the distribution. This acted like provides.pl in perlpkgscripts. Now I remember why I used Module::CoreList instead of going through this. Updates the perlcore.mods-* files under misc/ as well. Fix perl-dist to parse the extra * properly. --- preps/perl.d/perl-dist | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'preps') diff --git a/preps/perl.d/perl-dist b/preps/perl.d/perl-dist index dd1413c..fd5c216 100755 --- a/preps/perl.d/perl-dist +++ b/preps/perl.d/perl-dist @@ -13,7 +13,8 @@ if(exists $ENV{'GENPKGDBG'}){ } # Visible through entire file. -my %CoreMods = loadcore(); +my (%CoreMods, %CoreOnly); +loadcore(); package Convert; @@ -331,11 +332,7 @@ sub _distsofmods sub _nocore { - my @mods; - for my $m (@_){ - push @mods, $m unless(exists $CoreMods{$m}); - } - return @mods; + return grep { not $CoreOnly{$_} } @_; } #----------------------------------------------------------------------------- @@ -611,15 +608,13 @@ END_ERR exit 1; } - my %cm; open my $if, '<', $cmpath or die "$PROG: open $cmpath: $!"; while(<$if>){ - my($m, $v) = split; - $cm{$m} = $v; + my($m, $v, $coreonly) = split; + $CoreMods{$m} = $v; + $CoreOnly{$m} = 1 if($coreonly); } close $if; - return %cm; - } exit main(@ARGV); -- cgit v1.2.3-24-g4f1b