321
|
0 |
0 |
0 |
$$self{'set'}{$path} ||= do {
my @info;
croak("${_}: unable to locate file in perl library") unless $info[0] = $$lib{$_};
if ($$self{'use_packlist'} and exists $$self{'packlist'}{$_}) {
$$self{'set'}{"lib/$_"} ||= [$$self{'lib'}{$_} || die()] foreach (@{$$self{'packlist'}{$_};});
}
elsif (/^(.*)\.pm$/u) {
(my $auto = "auto/$1/") =~ s[::][/]gu;
die unless $auto =~ m[/([^/]+)/$]u;
my $base = $1;
if (exists $$lib{$auto}) {
my $so = "$auto$base.$Perl::LibExtractor::Config{'dlext'}";
if (my $src = $$lib{$so}) {
$so = "lib/$so";
push @{$info[1];}, $so;
$$self{'set'}{$so} = [$src];
};
my $ix = "${auto}autosplit.ix";
if (my $src = $$lib{$ix}) {
$ix = "lib/$ix";
push @{$info[1];}, $ix;
$$self{'set'}{$ix} = [$src];
croak("${src}: $!") unless open my $fh, '<:perlio', $src;
my $package;
while (defined($_ = <$fh>)) {
if (/^\s*sub\s+ ([^[:space:];]+) \s* (?:\([^)]*\))? \s*;?\s*$/ux) {
my $al = "auto/$package/$1.al";
croak("${al}: autoload file not found, but should be there.") unless my $src = $$lib{$al};
$al = "lib/$al";
push @{$info[1];}, $al;
$$self{'set'}{$al} = [$src];
}
elsif (/^\s*package\s+([^[:space:];]+)\s*;?\s*$/u) {
($package = $1) =~ s[::][/]gu;
}
elsif (/^\s*(?:#|1?\s*;?\s*$)/u) {
();
}
else {
warn "WARNING: ${src}: unparsable line, please report: $_";
};
};
};
skip: ;
};
};
if (exists $$self{'extra_deps'}{$_}) {
$self->add_eval("require q\000$_\000");
exists $$lib{$_} and $self->add_require($_) foreach (@{$$self{'extra_deps'}{$_};});
};
\@info
} |