paperlined.org
dev > perl > modules
document updated 12 years ago, on Jun 27, 2011

MODULE INSTALLATION
        General
        Unix (for home dirs, create a ~/.cpan/CPAN/MyConfig.pm file first)
        Windows (they can be manually downloaded from here)


FINDING NEW MODULES
        Complete CPAN list
        Activestate PPM list (stock modules: 5.6 and 5.8)

        PerlMonk's "Most Often Mentioned Modules"


INSTALLED INFO
        File::Find should be available on all stock distros.  Depending on your shell, one of these should list all installed modules:

                perl -MFile::Find -le "find sub{print$File::Find::name if/\.pm$/},@INC"
                perl -MFile::Find -le 'find sub{print$File::Find::name if/\.pm$/},@INC'


STOCK MODULES
    (modules for any specific version of perl (as well as perl source) can be found via the drop-down on that page)

    Directories, Filenames
        FindBin         - locate directory of original perl script
        File::Basename  - provides basename() and dirname()  [use File::Spec's splitpath() instead]
        File::Spec::Functions      - very portable way to manipulate paths   (::Functions is a friendlier front end to File::Spec)
            Cwd         - more thorough and powerful than File::Spec, but it's primarily Unix-oriented
        File::Temp      - create a temporary file (and open handle)
        File::Find      - recursively lists files under a directory

    Object Wrappers
        FileHandle      - filehandles (superclass of IO::File, IO::Seekable, and IO::Handle)
        IO::Socket      - network socket communcations (INET constructor is prefered)
        IO::Select      - select(2)
        File::stat      - stat(2)

    Serialization
        Data::Dumper    - stringify data structures
        Storable        - alternative to Data::Dumper

    Syntax modifications
        Attribute::Handlers - lets you do some cool cool stuff (replaced by the built-in attributes.pm?)
        Hook::LexWrap

    Other
        B               - exposes perl's internal hashing function hash() among other things
        Benchmark       - benchmark snippets of perl code to determine the fastest way to do something
        Carp            - Carp::cluck = "die" with a backtrace
        CGI
        CGI::Carp       - CGI error handling
        Getopt::Long    - command line parsing
        Getopt::Std     - command line parsing (getopts manpage)
        IPC::Open2      - read and write with a subprocess
        List::Util      - cool list operations: max, min, reduce, etc...
        POD::Text       - display built-in perldoc when user asks for --help
        POSIX           - lots of random junk
        Term::ANSIColor - string constants for ansi colors
        Term::ReadLine  - read in a line of input, with arrow keys, tab completion, and history
        Time::HiRes     - High resolution ualarm, usleep, and gettimeofday 
        Time::Local     - Parse dates from strings (opposite of localtime)
        Devel::Symdump - Dump the symbol table
    

NETWORKING
    HTTP
        lwpcook
        LWP::UserAgent
        HTTP::Request
        HTTP::Response
        LWP::Parallel / LWP::Parallel::UserAgent
    RELATED
        URI::URL        - Convert relative URL's to absolute URL's
    HTML
        HTML::Parser    - core HTML parsing code.  Easier to use another interface:
            HTML::TokeParser  - Access parse tree as a stream of tokens
            HTML::LinkExtor   - Extract links

    CGI
        HTML::FillInForm - After the user makes a mistake, load up a form with their original data.
        HTML::Template  - Like embperl, but without the perl.  Separation of presentation and logic.
        HTML::Template::Expr - Bluring the separation of presentation and logic.
        XML::Simple     - Read an XML file into a simple data structure
        HTML::Entities  - encode and decode characters such as &, <, and >

    EMAIL
        MIME::Parser    - Parse MIME-encoded email messages
        MIME::Entity
        MIME::Head
        MIME::Body
        Mail::Address
        

    News::NNTPClient- usenet client

    Date::Parse     - parse dates automatically

    Apache::ParseLog- Apache Log Parsing

    XML::RSS        - RSS parser/updater




                                        (use the $^O variable to see whether win32/unix)
Win32::             - Interfaces to some Win32 API functions
    TieRegistry     - Best interface to the registry
    Argv            - Make system(…), exec(…) and qw(…) work like unix without hacked quoting schemes.
    others


Misc
    DBI             - database interface
        Mini SQL:       DBD module, DB server manual
        My SQL:         DB server manual
    DBI::Shell      - interactive database shell
    DB_File         - pseduo-database interface

    MLDBM           - combination of DB_File and Data::Dumper

    String::Similarity - calculate the similarity of two strings

    Tk              - popular GUI library

    Win32::SerialPort - serial port functions (see TPJ for better docs)


Development
    TRACING EXECUTION PATH
        Devel::Trace
        Log::Trace
        Devel::XRay
        Devel::CallTrace