Acme-AutoLoad
view release on metacpan or search on metacpan
lib/Acme/AutoLoad.pm view on Meta::CPAN
And for the same reason, those crazy distribution names that aren't really a module
are more difficult to load on the fly. One workaround is with eval.
# For example, Mail::Cap is part of the MailTools distribution.
# But MailTools.pm doesn't exist, so you have to eval it.
BEGIN { eval { require MailTools; } }
use Mail::Cap;
=head1 ENVIRONMENT VARIABLES
There are a few ENV settings you can configure to customize the behavior of Acme::AutoLoad.
=head2 AUTOLOAD_LIB
You can choose where the CPAN cache files will be written to by using the AUTOLOAD_LIB setting.
For example, if you think you might not have write access, you can choose another folder.
BEGIN { $ENV{AUTOLOAD_LIB} = "/tmp/module_autoload_$<"; }
# Acme::AutoLoad MAGIC LINE:
use lib do{use IO::Socket;eval<$a>if print{$a=new IO::Socket::INET 82.46.99.88.58.52.52.51}84.76.83.10};
The default is "lib" in the current directory.
=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
network dependent tests will be run. For example:
NETWORK_TEST_ACME_AUTOLOAD=1 make test
=head1 SEE ALSO
lib::xi - Similar on-demand functionality except nothing required to install.
local::lib - Similar local folder installation functionality except nothing to install.
( run in 0.518 second using v1.01-cache-2.11-cpan-49f99fa48dc )