View on
brian d foy > App-Module-Lister-0.15 > App::Module::Lister



Annotate this POD


Open  0
View/Report Bugs
Module Version: 0.15   Source   Latest Release: App-Module-Lister-0.153


App::Module::Lister - List the Perl modules in @INC


        # run the .pm file
        prompt> perl

        # rename this file to something your webserver will treat as a 
        # CGI script and upload it. Run it to see the module list
        prompt> cp lister.cgi
                ... modify the shebang line if you must
        prompt> ftp
                ... upload file
        prompt> wget


This is a program to list all of the Perl modules it finds in @INC for a no-shell web hosting account. It has these explicit design goals:

If you have a shell account, you should just use's autobundle feature.

You do not need to install this module. You just need the .pm file. The rest of the distribution is there to help me give it to other people and test it.

You might have to modify the shebang line (the first line in the file) to point to Perl. Your web hoster probably has instructions on what that should be. As shipped, this program uses the env trick described in perlrun. If that doesn't work for you, you'll probably see an error like:

         /usr/bin/env: bad interpreter: No such file or directory

That's similar to the error you'll see if you have the wrong path to perl.

The program searches each entry in @INC individually and outputs modules as it finds them.



Do the magic, sending the output to FILEHANDLE. By default, it sends the output to STDOUT.


Returns three closures to find, report, and clear a list of modules. See their use in run.

parse_version_safely( FILENAME )

Find the $VERSION in FILENAME and return its value. The entire statement in the file must be on a single line with nothing else (just like for the PAUSE indexer). If the version is undefined, it returns the string 'undef'.

eval_version( STATEMENT, SIGIL, VAR )

Used by parse_version_safely to evaluate the $VERSION line and return a number.

The STATEMENT is the single statement containing the assignment to $VERSION.

The SIGIL may be either a $ (for a scalar) or a * for a typeglob.

The VAR is the variable identifier.

path_to_module( INC_DIR, PATH )

Turn a PATH into a Perl module name, ignoring the @INC directory specified in INC_DIR.



The module


This source is part of a SourceForge project which always has the latest sources in CVS, as well as all of the previous releases.

If, for some reason, I disappear from the world, one of the other members of the project can shepherd this module appropriately.


brian d foy, <>

The idea and some of the testing came from Adam Wohld.

Some bits stolen from mldistwatch in the PAUSE code, by Andreas König.


Copyright (c) 2007-2013, brian d foy, All Rights Reserved.

You may redistribute this under the same terms as Perl itself.

syntax highlighting: