Hello,
In ExtUtils::MM_Unix, in the sub pm_to_blib(), there is:
-------------------------------8<----------------------------------
sub pm_to_blib {
my $self = shift;
my($autodir) = File::Spec->catdir('$(INST_LIB)','auto');
my $r = q{
pm_to_blib: $(TO_INST_PM)
};
my %pm_to_blib = %{$self->{PM}};
my @a;
my $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) { # limit line length
_pm_to_blib_flush($self, $autodir, \$r, \@a, \$l);
}
push @a, $pm, $blib;
$l += $la + $lb;
}
_pm_to_blib_flush($self, $autodir, \$r, \@a, \$l);
return $r.q{ }.$self->{NOECHO}.q{$(TOUCH) $@};
}
-------------------------------8<----------------------------------
Why is the list of parameters being passed to _pm_to_blib_flush()
with "$self" as the first argument? That makes "$self" appear TWICE
to the latter sub. Once, implicitly, as in any method invocation;
and a second time because of the explicit argument.
Is this not erronious code? It caused an error caught under the
"strict 'refs'" conditions when I ran it; because a later arg
that is supposed to be a string scalar is used instead as a
scalar ref. I mean, the args all out of joint.
Soren A
--
--*perlspinr*--
**Helping to consume excess Internet bandwidth since 1996**