Table A.6. General Programming
Module | Description |
---|
Benchmark | Checks and compares the speed of running code in CPU time. |
Config | Accesses Perl configuration options from the %Config hash. |
Env | Converts the %ENV hash to scalars containing environment variables; e.g., $ENV{HOME} becomes $HOME. |
English | Provides scalars in English or awk names for special variables; e.g., $0 can be represented as $PROGRAM_NAME. |
Getopt | Provides for processing of command-line options and switches with arguments. |
Shell | Used to run shell commands within Perl scripts by treating the commands as subroutines; e.g., $today=date(); |
Symbol | Generates anonymous globs with gensym() and qualifies variable names with qualify(). |
Table A.9. File Handling
Module | Description |
---|
Cwd | Gets the pathname of the current working directory. Produces an error message if used with the -w switch. |
DirHandle | Provides an object-oriented interface for directory handles. |
Fcntl | Loads the libc fcntl.h (file control) defines. |
File::Basename | Splits a filename into components or extracts a filename or a directory from full directory path. |
File::CheckTree | Runs file tests on a collection of files in a directory tree. |
File::Copy | Used to copy files or filehandles. |
File::DosGlob | Does DOS-like globbing. |
File::Find | Used to traverse a UNIX file tree. |
File::Finddepth | Searches depth-first through a file system. |
File::Glob | Does UNIX filename globbing. |
File::Path | Creates and removes a list of directories. |
File::Spec | Performs portable operations on filenames. |
FileCache | Allows more files to be opened than permitted by the system. |
FileHandle | Provides an object-oriented interface to filehandle access methods. |
SelectServer | Saves and restores a selected filehandle. |
flush.pl | Writes any data remaining in the filehandle's buffer or prints an expression and then flushes the buffer. |
pwd.pl | Sets the PWD environment variable to the present working directory after using chdir. |
stat.pl | Puts the values returned by the stat function into scalars—$st_dev, $st_ino, $st_mode, $st_nlink, $st_uid, $st_rdev, $st_atime, $st_mtime, $st_ctime, $st_blksize, $st_blocks. |
Table A.10. Text Processing
Module | Description |
---|
Pod::Text | Converts pod documentation to ASCII-formatted text. |
Search::Dict | Searches for a string in a dictionary (alphabetically ordered) file and sets the file pointer to the next line. |
Term::Complete | Provides a filename-completion-like interface for prompting a user for partial input that can be completed by pressing a Tab key or a complete list of choices by pressing <Ctrl>-d. |
Text::Abbrev | Creates an abbreviation table, a hash consisting of key/value pairs from a list. The key is the abbreviation and the value is the string that was abbbreviated; e.g., ma/mail, mo/more. |
Text::ParseWords | Parses a line of text into a list of words like the shell does, stripping leading whitespace. |
Text::Soundex | Maps words to four character-length codes that roughly correspond to how the word is pronounced or sounds. |
Text::Tabs | Expands tabs into spaces and unexpands tabs to spaces. |
Text::Warp | Wraps text into a paragraph. |
Table A.13. Networking
Module | Description |
---|
chat2.pl | Allows Perl to manipulate interactive network services such as FTP. |
comm.pl | Newer than chat2.pl. Allows Perl to manipulate interactive services. |
IPC::Open2 | Opens a process for reading and writing to allow data to be piped to and from an external program. |
IPC::Open3 | Opens a process for reading, writing, and error handling so that data can be piped to and from an external program. |
Net::Ping | Checks whether a remote machine is up. |
Socket | Creates sockets and imports socket methods for interprocess communication and loads socket.h header file. |
Sys::Hostname | Gets the hostname for the system. |
Table A.16. Object-Oriented Module Functions
Module | Description |
---|
Autoloader | For large modules, loads in only needed sections of a module. |
AutoSplit | Splits module into bite-sized chunks for autoloading. |
Devel::SelfStubber | Generates stubs for self-loading modules to ensure that if a method is called, it will get loaded. |
DynaLoader | Used to automatically and dynamically load modules. |
Exporter | Used by other modules to make methods and variables available through importation. |
overload | Used to overload mathmatical operations. |
Tie::Hash | Provides methods for tying a hash to a package. |
Tie::Scalar | Provides methods for tying a scalar to a package. |
Tie::SubstrHash | Provides a hash-table-like interface to an array with constant key and record size. |
Table A.17. Language Extension
Module | Description |
---|
ExtUtils::Install | For installing and deinstalling platform-dependent Perl extensions. |
ExtUtils::Liblist | Determines what libraries to use and how to use them. |
ExtUtils::MakeMaker | Creates a Makefile for a Perl extension in the extension's library. |
ExtUtils::Manifest | Automates the maintenance of MANIFEST files, consisting of a list of filenames. |
ExtUtils::Miniperl | Writes C code for perlmain.c, which contains the bootstrap code for making archive libraries needed by modules available from within Perl. |
ExtUtils::Mkbootstrap | Is called from the extension's Makefile to create a bootstrap file needed to do dynamic loading on some systems. |
ExtUtils::Mksysmlists | Writes linker option files used by some linkers during the creation of shared libraries for dynamic extensions. |
ExtUtils::MM_OS2 | Overrides the implementation of methods, causing UNIX behavior. |
ExtUtils::MM_Unix | To be used with MakeMaker to provide methods for both UNIX and non-UNIX systems. |
ExtUtils::MM_VMS | Overrides the implementation of methods, causing UNIX behavior. |
Fcntl | Translates the C fcntl header file. |
POSIX | Provides the Perl interface to IEEE std 1003.1 identifiers. |
Safe | Provides private compartments where unsafe Perl code can be evaluated. |
Test::Harness | Used by MakeMaker to run test scripts for Perl extensions and produce diagnostics. |