Acme-CPANModules-ModuleAutoinstallers
view release on metacpan or search on metacpan
lib/Acme/CPANModules/ModuleAutoinstallers.pm view on Meta::CPAN
package Acme::CPANModules::ModuleAutoinstallers;
use strict;
our $AUTHORITY = 'cpan:PERLANCAR'; # AUTHORITY
our $DATE = '2024-08-29'; # DATE
our $DIST = 'Acme-CPANModules-ModuleAutoinstallers'; # DIST
our $VERSION = '0.004'; # VERSION
our $LIST = {
summary => 'List of modules that autoinstalls other modules during run-time',
description => <<'MARKDOWN',
These "module autoinstallers" modules can automatically install missing module
during run-time using one of installers (usually `cpanm` a.k.a.
<pm:App::cpanminus>). Convenient when running a Perl script (that comes without
a proper distribution or `cpanfile`) that uses several modules which you might
not have. The alternative to lib::xi is the "trial and error" method: repeatedly
run the Perl script to see which module it tries and fails to load.
They work by installing a hook in `@INC`. Read more about require hooks in
`perlfunc` under the `require` function.
MARKDOWN
entries => [
{module => 'lazy'},
{module => 'lib::xi'},
{module => 'Module::AutoINC'},
{module => 'Require::Hook::More'}, # actually autoinstalling feature not yet implemented
],
};
1;
# ABSTRACT: List of modules that autoinstalls other modules during run-time
__END__
=pod
=encoding UTF-8
=head1 NAME
Acme::CPANModules::ModuleAutoinstallers - List of modules that autoinstalls other modules during run-time
=head1 VERSION
This document describes version 0.004 of Acme::CPANModules::ModuleAutoinstallers (from Perl distribution Acme-CPANModules-ModuleAutoinstallers), released on 2024-08-29.
=head1 DESCRIPTION
These "module autoinstallers" modules can automatically install missing module
during run-time using one of installers (usually C<cpanm> a.k.a.
L<App::cpanminus>). Convenient when running a Perl script (that comes without
a proper distribution or C<cpanfile>) that uses several modules which you might
not have. The alternative to lib::xi is the "trial and error" method: repeatedly
run the Perl script to see which module it tries and fails to load.
They work by installing a hook in C<@INC>. Read more about require hooks in
C<perlfunc> under the C<require> function.
=head1 ACME::CPANMODULES ENTRIES
=over
=item L<lazy>
=item L<lib::xi>
=item L<Module::AutoINC>
=item L<Require::Hook::More>
=back
=head1 FAQ
=head2 What is an Acme::CPANModules::* module?
An Acme::CPANModules::* module, like this module, contains just a list of module
names that share a common characteristics. It is a way to categorize modules and
document CPAN. See L<Acme::CPANModules> for more details.
=head2 What are ways to use this Acme::CPANModules module?
Aside from reading this Acme::CPANModules module's POD documentation, you can
install all the listed modules (entries) using L<cpanm-cpanmodules> script (from
L<App::cpanm::cpanmodules> distribution):
% cpanm-cpanmodules -n ModuleAutoinstallers
Alternatively you can use the L<cpanmodules> CLI (from L<App::cpanmodules>
distribution):
% cpanmodules ls-entries ModuleAutoinstallers | cpanm -n
or L<Acme::CM::Get>:
% perl -MAcme::CM::Get=ModuleAutoinstallers -E'say $_->{module} for @{ $LIST->{entries} }' | cpanm -n
( run in 0.669 second using v1.01-cache-2.11-cpan-3d66aa2751a )