Module::AutoINC

Module::AutoINC is a Perl module that can download and install CPAN/PPM modules upon first use.
Download

Module::AutoINC Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Mike MacKenzie
  • Publisher web site:
  • http://search.cpan.org/~mackenzie/Module-AutoINC-0.02/lib/Module/AutoINC.pm

Module::AutoINC Tags


Module::AutoINC Description

Module::AutoINC is a Perl module that can download and install CPAN/PPM modules upon first use. SYNOPSIS perl -MModule::AutoINC < script >ABSTRACTWhen Module::AutoINC is loaded, it will add itself to @INC and catch any requests for missing resources. If a Perl module is requested that has not been installed, then this will attempt to load it. Under Active State Perl (or any Perl where PPM is available), PPM will attempt to install it. Otherwise CPAN will be queried and, assuming that the module exists on CPAN, CPAN::Shell will be invoked to install it. Execution of the script continues after the requisite module has been installed.Module::AutoINC is a slightly useful tool designed to streamline the process of installing the modules required by a script. By loading the Module::AutoINC module (usually via a "-MModule::AutoINC" command-line option), the user is registering a handler that will catch any attempt to use a module that does not exist on the local machine. In this case, the CPAN::Shell module will be invoked to search for the specified module and, if found, an attempt will be made to install the module. If successful, the module will be loaded and execution will continue as normal.Imported SymbolsYou can modify the behavior of the module slightly using several import symbols. All import symbols are case-insensitive.If you import the special symbol 'force' then the installation of the module(s) will be forced. The definition of a 'forced' installation varies depending on whether you are installing using PPM or CPAN. See the relevant documentation for each system for more information.You can override the installation method detection using the import symbols, 'cpan' or 'ppm'. 'cpan' will cause CPAN to be used for module installation no matter whether PPM is available or not. 'ppm' will attempt to install the module using PPM regardless of whether ppm is findable by Module::AutoINC. Of course, you should know what you are doing if you use these import symbols.Examples perl -MModule::AutoINC -MLingua::Num2Word=cardinal -le 'print cardinal("en", 42)'...will download and install Lingua::Num2Word and Lingua::EN::Num2Word. perl -MModule::AutoINC=cpan -MLingua::Num2Word=cardinal -le 'print cardinal("de", 42)'...will then download and install (using CPAN, even under ActiveState Perl) Lingua::DE::Num2Word (German). perl -MModule::AutoINC=force -MLingua::Num2Word=cardinal -le 'print cardinal("es", 42)'...will then download and install (forcefully) Lingua::ES::Numeros (Spanish).Requirements:· PerlWhat's New in This Release:· No code changes. The Makefile.pl was asking for too recent a version of Perl. Now it asks for Perl 5.004 as a minimum which is about the time the CPAN.pm module was introduded, near as I can tell.


Module::AutoINC Related Software