Skip to content
John Gardner edited this page Jan 7, 2022 · 1 revision

NAME

filename - print CPAN modules installed by user

SYNOPSIS

filename > module-list.txt

DESCRIPTION

Generates a list of CPAN modules which the user chose to install, as well as any dependencies the installed modules required. The output is an alphabetised, line-delimited list of qualified module-names:

Algorithm::Diff
Archive::Zip
...
Date::Parse
Digest::SHA1
ExtUtils::MakeMaker::version::vpp
Image::ExifTool
...
YAML::Types
inc::latest
lib::core::only
local::lib

This performs a task similar to cpan -a, except the generated lists exclude core modules and builtins. Since the output is plain-text, one may reinstall their library without an intermediate install::Bundle call:

# Save list of CPAN modules
$ C<filename> > list.txt

# Reinstall everything later on
$ xargs < list.txt cpan -i
$ cpan -i $(cat list.txt)

NOTES

This module is neither exciting, nor original. It does what autobundling does, albeit cleaner and simpler. CPAN::Shell->autobundle emits every module visible in one's @INC paths, making it more difficult to recollect which modules were user-installed, and which are defaults.

TODO

Stuff I haven't done, and probably never will:

SEE ALSO

The PerlMonks thread which convinced me there was no simple way to generate a "clean" module list using CPAN::Shell.

AUTHOR

John Gardner <[email protected]> https://github.com/Alhadis

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 55:

=over should be: '=over' or '=over positive_number'

Around line 66:

You forgot a '=back' before '=head1'

This is presumably what a custom sidebar looks like.

Clone this wiki locally