home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam    

B.2 Standard Modules

The following is a list of all Perl pragmas and modules included with the current Perl distribution (Version 5.004). The classification of the modules is admittedly arbitrary.


Table B.1: General Programming: Miscellaneous

Module

Function

autouse

Defers loading of a module until it's used

constant

Creates compile-time constants

Benchmark

Checks and compares running times of code

Config

Accesses Perl configuration information

Env

Imports environment variables

English

Uses English or awk names for punctuation variables

FindBin

Finds path of currently executing program

Getopt::Long

Extended processing of command-line options

Getopt::Std

Processes single-character switches with switch clustering

lib

Manipulates @INC at compile-time

Shell

Runs shell commands transparently within Perl

strict

Restricts unsafe constructs

Symbol

Generates anonymous globs; qualifies variable names

subs

Predeclares subroutine names

vars

Predeclares global variable names


Table B.2: General Programming: Error Handling and Logging

Module

Function

Carp

Generates error messages

diagnostics

Forces verbose warning diagnostics

sigtrap

Enables stack backtrace on unexpected signals

Sys::Syslog

Perl interface to UNIX syslog (3) calls


Table B.3: General Programming: File Access and Handling

Module

Function

Cwd

Gets pathname of current working directory

DirHandle

Supplies object methods for directory handles

Fcntl

Loads the C Fcntl.h defines

File::Basename

Parses file specifications

File::CheckTree

Runs many tests on a collection of files

File::Copy

Copies files or filehandles

File::Find

Traverses a file tree

File::Path

Creates or removes a series of directories

FileCache

Keeps more files open than the system permits

FileHandle

Supplies object methods for filehandles

SelectSaver

Saves and restores selected filehandle


Table B.4: General Programming: Classes for I/O Operations

Module

Function

IO

Top-level interface to IO::* classes

IO::File

Object methods for filehandles

IO::Handle

Object methods for I/O handles

IO::Pipe

Object methods for pipes

IO::Seekable

Seek-based methods for I/O objects

IO::Select

Object interface to select

IO::Socket

Object interface to sockets


Table B.5: General Programming: Text Processing and Screen Interfaces

Module

Function

locale

Uses POSIX locales for built-in operations

Pod::HTML

Converts pod data to HTML

Pod::Text

Converts pod data to formatted ASCII text

Search::Dict

Searches for key in dictionary file

Term::Cap

Termcap interface

Term::Complete

Word completion module

Text::Abbrev

Creates an abbreviation table from a list

Text::ParseWords

Parses text into an array of tokens

Text::Soundex

Implements the Soundex Algorithm described by Knuth

Text::Tabs

Expands and unexpands tabs

Text::Wrap

Wraps text into a paragraph


Table B.6: Database Interfaces

Module

Function

AnyDBM_File

Provides framework for multiple DBMs

DB_File

Access to Berkeley DB

GDBM_File

Tied access to GDBM library

NDBM_File

Tied access to NDBM files

ODBM_File

Tied access to ODBM files

SDBM_File

Tied access to SDBM files


Table B.7: Mathematics

Module

Function

Integer

Does arithmetic in integer instead of double

Math::BigFloat

Arbitrary-length, floating-point math package

Math::BigInt

Arbitrary-length integer math package

Math::Complex

Complex numbers package


Table B.8: The World Wide Web

Module

Function

CGI

Web server interface (Common Gateway Interface)

CGI::Apache

Support for Apache's Perl module

CGI::Carp

Log server errors with helpful context

CGI::Fast

Support for FastCGI (persistent server process)

CGI::Push

Support for server push

CGI::Switch

Simple interface for multiple server types


Table B.9: Networking and Interprocess Communication

Module

Function

IPC::Open2

Opens a process for both reading and writing

IPC::Open3

Opens a process for reading, writing, and error handling

Net::Ping

Checks whether a host is online

Socket

Loads the C socket.h defines and structure manipulators

Sys::Hostname

Tries every conceivable way to get hostname


Table B.10: Automated Access to the Comprehensive Perl Archive Network

Module

Function

CPAN

Simple interface to CPAN

CPAN::FirstTime

Utility for creating CPAN configuration file

CPAN::Nox

Runs CPAN while avoiding compiled extensions


Table B.11: Time and Locale

Module

Function

Time::Local

Efficiently computes time from local and GMT time

I18N::Collate

Compares 8-bit scalar data according to the current locale


Table B.12: Object Interfaces to Built-in Functions

Module

Function

Class::Struct

Declares struct-like datatypes as Perl classes

File::stat

Object interface to stat function

Net::hostent

Object interface to gethost * functions

Net::netent

Object interface to getnet * functions

Net::protoent

Object interface to getproto * functions

Net::servent

Object interface to getserv * functions

Time::gmtime

Object interface to gmtime function

Time::localtime

Object interface to localtime function

Time::tm

Internal object for Time::{gm,local}time

User::grent

Object interface to getgr * functions

User::pwent

Object interface to getpw * functions


Table B.13: For Developers: Autoloading and Dynamic Loading

Module

Function

AutoLoader

Loads functions only on demand

AutoSplit

Splits a package for autoloading

Devel::SelfStubber

Generates stubs for a SelfLoading module

DynaLoader

Automatic dynamic loading of Perl modules

SelfLoader

Loads functions only on demand


Table B.14: For Developers: Language Extensions/Platform Development Support

Module

Function

blib

Finds blib directory structure during module builds

ExtUtils::Embed

Utilities for embedding Perl in C programs

ExtUtils::Install

Installs files from here to there

ExtUtils::Liblist

Determines libraries to use and how to use them

ExtUtils::MakeMaker

Creates a Makefile for a Perl extension

ExtUtils::Manifest

Utilities to write and check a MANIFEST file

ExtUtils::Miniperl

Writes the C code for perlmain.c

ExtUtils::Mkbootstrap

Makes a bootstrap file for use by DynaLoader

ExtUtils::Mksymlists

Writes linker option files for dynamic extension

ExtUtils::MM_OS2

Methods to override UNIX behavior in ExtUtils::MakeMaker

ExtUtils::MM_Unix

Methods used by ExtUtils::MakeMaker

ExtUtils::MM_VMS

Methods to override UNIX behavior in ExtUtils::MakeMaker

ExtUtils::testlib

Fixes @INC to use just-built extension

Opcode

Disables opcodes when compiling Perl code

ops

Pragma for use with Opcode module

POSIX

Interface to IEEE Std 1003.1

Safe

Creates safe namespaces for evaluating Perl code

Test::Harness

Runs Perl standard test scripts with statistics

vmsish

Enables VMS-specific features


Table B.15: For Developers: Object-Oriented Programming Support

Module

Function

Exporter

Default import method for modules

overload

Overloads Perl's mathematical operations

Tie::RefHash

Base class for tied hashes with references as keys

Tie::Hash

Base class definitions for tied hashes

Tie::Scalar

Base class definitions for tied scalars

Tie::StdHash

Base class definitions for tied hashes

Tie::StdScalar

Base class definitions for tied scalars

Tie::SubstrHash

Fixed-table-size, fixed-key-length hashing

UNIVERSAL

Base class for all classes







??????????????@Mail.ru