The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Devel::Modlist - Perl extension to collect module use information

SYNOPSIS

    perl -d:Modlist script.pl

DESCRIPTION

The Devel::Modlist utility is provided as a means by which to get a quick run-down on which libraries and modules are being utilized by a given script.

Just as compiler systems like gcc provide dependancy information via switches such as -M, Devel::Modlist is intended to assist script authors in preparing dependancy information for potential users of their scripts.

USAGE

Usage of Devel::Modlist is simple. The primary method of invocation is to use the -d option of Perl:

    perl -d:Modlist script.pl

Alternately, one could use the -M option:

    perl -MDevel::Modlist script.pl

In the case of this module, the two are identical save for the amount of typing (and option passing, see below). It is not recommended that this module be loaded directly by a script via the use keyword, as that would cause the dependancy reporting after every invocation until it was removed from the code.

OPTIONS

The following options may be specified to the package on the command line. Current (as of February 2000) Perl versions (release version up to 5.00503 and development version up to 5.5.660) cannot accept options to the -d: flag as with the -M flag. Thus, to pass an option one must use:

    perl -MDevel::Modlist=option1[,option2,...]

Unfortunately, this inhibits the stop option detailed below. To use this option, an invocation of:

    perl -d:Modlist -MDevel::Modlist=option1[,option2,...]

does the trick, as the first invocation puts the interpreter in debugging mode (necessary for stop to work) while the second causes the options to be parsed and recorded by Devel::Modlist.

nocore

Suppress the display of those modules that are a part of the Perl core. This is dependant on the Perl private library area not being an exact substring of the site-dependant library. The build process checks this for you prior to install.

noversion

Suppress the inclusion of version information with the module names. If a module has defined its version by means of the accepted standard of declaring a variable $VERSION in the package namespace, Devel::Modlist finds this and includes it in the report by default. Use this option to override that default.

path

Display the path and filename of each module instead of the module name. Useful for producing lists for later input to tools such as rpm.

stop

Exit before the first actual program line is executed. This provides for fetching the dependancy list without actually running the full program. This has a drawback: if the program uses any of require, eval or other such mechanisms to load libraries after the compilation phase, these will not be reported.

AUTHOR

Randy J. Ray <rjray@tsoft.com>, using idea and prototype code provided by Tim Bunce <Tim.Bunce@ig.co.uk>

SEE ALSO

perl(1).