The previous edition of this book included comprehensive,
definitive coverage for all modules that were part of the standard Perl
distribution. But if we did that again now, you'd pay twice what you're
paying for this book, not to mention what you'd have to pay the
chiropractor after trying to carry the book home. Over the last few
years, more and more modules have come bundled standard; we're up to
around two hundred of them right now. Some of these, such as
CGI
, have remarkably extensive documentation in their
own right. And if you're using ActiveState's distribution of Perl, your
standard library is even more luxed out.
So instead, we provide a complete listing of the standard modules, sorted by type, along with a brief description of what each module does. Then we cherry pick a few of our favorite modules by providing examples of typical uses, followed by a short description of how they work, just to give you a taste of using them. The descriptions are suggestive rather than comprehensive, and virtually all the modules have features beyond those shown. However, complete documentation for all standard modules is included with every Perl distribution, so you can just look up the details on your own system using the perldoc program, your system's man (1) command, or your favorite browser. See Online Documentation in Preface. Ask your Local Expert if you can't find the docs, because they're almost certainly installed somewhere on your system. Even if they're not, you can always read the pod docs directly from the modules themselves, because all module docs come embedded in their corresponding module (.pm) files, and pod was designed to be somewhat readable. (Unlike, say, HTML.)
Normal module names begin with an uppercase letter. Lowercase names indicate pragmas that you'll find documented in Chapter 31, rather than in this chapter.
These modules extend Perl's type system (or lack thereof) in various ways.
These modules do things with (or to) text.
Module | Description |
---|---|
Search::Dict | |
Text::Abbrev | |
Text::ParseWords | |
Text::Soundex | Use Knuth's Soundex algorithm |
Text::Tabs | Expand or unexpand tabs like expand (1) and unexpand (1) |
Text::Wrap |
These modules provide cross-platform methods of file access.
These modules provide object-oriented file, directory, and IPC access.
These modules tweak your interface to the operating system.
These modules provide abstract interfaces around the basic interfaces we wrote about in Chapter 16.
These modules interface to the WWW. You may have heard of it.
Module | Description |
---|---|
CGI | |
CGI::Apache | |
CGI::Carp | |
CGI::Cookie | |
CGI::Fast | |
CGI::Pretty | |
CGI::Push |
(Not to be confused with Intentions and Externals.)
Module | Description |
---|---|
attributes | |
attrs | |
base | |
Data::Dumper | |
DB | |
Devel::DProf | |
Devel::Peek | |
diagnostics | |
Dumpvalue | |
English | Use longer variable names for built-in punctuation variables |
Env | |
Errno | Load the C library's
errno.h definitions and tie the
|
Fatal | Replace built-ins with versions that raise exceptions on failure |
fields | Declare compile-time verified access to a class's data attributes |
less | |
re | |
strict | |
subs | |
vars | Predeclare global variables (obsolete—see
|
These modules provide base classes and other conveniences.
Module | Description |
---|---|
Tie::Array | |
Tie::Handle | |
Tie::Hash | |
Tie::RefHash | |
Tie::Scalar | |
Tie::SubstrHash | |
UNIVERSAL |
And there's an awful lot of documentation to support.
These modules help other modules jump through various hoops.
These modules are for timing and testing, to see how much faster and cleaner your code doesn't run anymore.
These modules support various backend code generators for Perl.
If you got the Perl distribution for Microsoft systems from ActiveState, you already have the following Microsoft-only modules included for you. If you just grabbed the standard source distribution (maybe you want to build it under the Cygwin Unix-emulation environment) but you're running on Wintel, you can get all of these modules from CPAN.