Acme-CPANModules-LoadingModules

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    require() to translate between module name and path name, since the
    traditional behavior of require() is to expect module name in bareword
    form but path name in string form. This confusion will likely be fixed
    in future perl versions. For example, see PPC 0006 [1].

    [1] <https://github.com/Perl/PPCs/blob/main/ppcs/ppc0006-load-module.md>

    Installing modules automatically on demand

    Since Perl provides require hooks, one can trap the module loading
    process and check for an uninstalled module and attempt to install it
    automatically on demand when a code wants to load that module. Probably
    not suitable for use in production. See separate list:
    Acme::CPANModule::ModuleAutoinstallers.

    Loading module on demand

    Aside from require hook, Perl also provides the AUTOLOAD mechanism (see
    "perlsub" documentation for more details). This lets you catch unknown
    function being called and lets you attempt to load a module that might
    provide that function. It is not exactly "loading modules on demand" but

lib/Acme/CPANModules/LoadingModules.pm  view on Meta::CPAN

`require()` to translate between module name and path name, since the
traditional behavior of `require()` is to expect module name in bareword form
but path name in string form. This confusion will likely be fixed in future perl
versions. For example, see PPC 0006 [1].

[1] <https://github.com/Perl/PPCs/blob/main/ppcs/ppc0006-load-module.md>


**Installing modules automatically on demand**

Since Perl provides require hooks, one can trap the module loading process and
check for an uninstalled module and attempt to install it automatically on
demand when a code wants to load that module. Probably not suitable for use in
production. See separate list: <pm:Acme::CPANModule::ModuleAutoinstallers>.


**Loading module on demand**

Aside from require hook, Perl also provides the AUTOLOAD mechanism (see
`perlsub` documentation for more details). This lets you catch unknown function
being called and lets you attempt to load a module that might provide that

lib/Acme/CPANModules/LoadingModules.pm  view on Meta::CPAN

L<Module::Load> is basically just a thin wrapper over Perl's builtin
C<require()> to translate between module name and path name, since the
traditional behavior of C<require()> is to expect module name in bareword form
but path name in string form. This confusion will likely be fixed in future perl
versions. For example, see PPC 0006 [1].

[1] L<https://github.com/Perl/PPCs/blob/main/ppcs/ppc0006-load-module.md>

B<Installing modules automatically on demand>

Since Perl provides require hooks, one can trap the module loading process and
check for an uninstalled module and attempt to install it automatically on
demand when a code wants to load that module. Probably not suitable for use in
production. See separate list: L<Acme::CPANModule::ModuleAutoinstallers>.

B<Loading module on demand>

Aside from require hook, Perl also provides the AUTOLOAD mechanism (see
C<perlsub> documentation for more details). This lets you catch unknown function
being called and lets you attempt to load a module that might provide that
function. It is not exactly "loading modules on demand" but close enough for a



( run in 0.383 second using v1.01-cache-2.11-cpan-8d75d55dd25 )