Acme-AutoLoad
view release on metacpan or search on metacpan
lib/Acme/AutoLoad.pm view on Meta::CPAN
mkbase($cache_file) or die "$cache_file: Unable to create! $!\n";
shift @INC if $INC[0] eq \&ignore;
if ($f =~ m{^([\w/]+)\.pm}) {
my $dist = $1;
my $mod = $1;
$f = "$1.pm";
$dist =~ s{/+}{-}g;
$mod =~ s{/+}{::}g;
my $mapper = $ENV{AUTOLOAD_SRC} || "http://fastapi.metacpan.org/v1/release";
my $search = fetch("$mapper/$dist/");
warn "DEBUG: Probed: $last_fetched\n" if $ENV{AUTOLOAD_DEBUG};
if ($search =~ m{download_url.*?(\w+/[\w\d\-\.]+)\.tar.gz}) {
my $src = full("/source/$1/");
if (my $MANIFEST = fetch "$src/MANIFEST") {
$src = $1 if $last_fetched =~ m{^(.*?)/+MANIFEST};
if ($MANIFEST =~ m{^lib/}m) {
warn "DEBUG: YEY! Found a lib/ somewhere!\n" if $ENV{AUTOLOAD_DEBUG};
while ($MANIFEST =~ s{^lib/(\S+\.pm)}{ }m) {
my $remote = $1;
warn "DEBUG: MATCH [lib/$remote] RIPPED OUT\n" if $ENV{AUTOLOAD_DEBUG};
lib/Acme/AutoLoad.pm view on Meta::CPAN
=head2 AUTOLOAD_DEBUG
You can enable verbose debugging to see more how it works or
if you are having trouble with some modules by setting
AUTOLOAD_DEBUG to a true value.
The default is off.
=head2 AUTOLOAD_SRC
You can use AUTOLOAD_SRC to specify the mapper engine to ask where the latest location of the module is.
# For example
BEGIN { $ENV{AUTOLOAD_SRC} = "http://metacpan.org/release"; }
The default is "http://fastapi.metacpan.org/v1/release" .
=head2 NETWORK_TEST_ACME_AUTOLOAD
In order to really test the test suite, the NETWORK_TEST_ACME_AUTOLOAD
environment variable must be set to a true value, otherwise none of the
( run in 0.349 second using v1.01-cache-2.11-cpan-49f99fa48dc )