From: Jarkko Hietaniemi Date: Sun, 25 Nov 2001 03:18:05 +0000 (+0000) Subject: Avoid "will not stay shared" warnings. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=158e3910f3d0bce487277fa0db25247b664ed87c;p=p5sagit%2Fp5-mst-13.2.git Avoid "will not stay shared" warnings. p4raw-id: //depot/perl@13253 --- diff --git a/lib/ExtUtils/MM_Unix.pm b/lib/ExtUtils/MM_Unix.pm index 16c6e6f..8df218b 100644 --- a/lib/ExtUtils/MM_Unix.pm +++ b/lib/ExtUtils/MM_Unix.pm @@ -3069,6 +3069,16 @@ destination and autosplits them. See L =cut +sub _pm_to_blib_flush { + my ($self, $autodir, $rr, $ra, $rl) = @_; + $$rr .= +q{ }.$self->{NOECHO}.q[$(PERLRUNINST) -MExtUtils::Install \ + -e "pm_to_blib({qw{].qq[@$ra].q[}},'].$autodir.q{','$(PM_FILTER)')" +}; + @$ra = (); + $$rl = 0; +} + sub pm_to_blib { my $self = shift; my($autodir) = $self->catdir('$(INST_LIB)','auto'); @@ -3078,24 +3088,16 @@ pm_to_blib: $(TO_INST_PM) my %pm_to_blib = %{$self->{PM}}; my @a; my $l; - sub _pm_to_blib_flush { - $r .= -q{ }.$self->{NOECHO}.q[$(PERLRUNINST) -MExtUtils::Install \ - -e "pm_to_blib({qw{].qq[@a].q[}},'].$autodir.q{','$(PM_FILTER)')" -}; - @a = (); - $l = 0; - } while (my ($pm, $blib) = each %pm_to_blib) { my $la = length $pm; my $lb = length $blib; - if ($l + $la + $lb + @a / 2 > 200) { - _pm_to_blib_flush(); + if ($l + $la + $lb + @a / 2 > 200) { # limit line length + _pm_to_blib_flush($self, $autodir, \$r, \@a, \$l); } push @a, $pm, $blib; $l += $la + $lb; } - _pm_to_blib_flush(); + _pm_to_blib_flush($self, $autodir, \$r, \@a, \$l); return $r.q{ }.$self->{NOECHO}.q{$(TOUCH) $@}; }