Appendix 5
Appendix 5
On Selected Modules
Perl has a large number of pre-written modules that can perform a wide variety of tasks. One simply needs to go on the Web, visit the site http://www.cpan.org, perform a search, read the documentation, decide which module to download, and then download it and start using it. Finding the right module is not difficult and whether one is using Perl on a Unix machine or a PC or a Macintosh, it is very easy to install packages. Once a package is installed, one has to read its documentation carefully to be able to start using it.
All Perl modules are available for free downloading. There are modules to do almost anything one wants. So, before trying to write Perl code for a project, it makes good sense to see if there are any modules that may be of help.
Perl modules are classified at CPAN into many categories. Some of the categories are listed below. Under each category there are a large number of modules.
• Archiving and Compression: This category includes modules archiving, modules for managing Perl modules on various systems, conversion among various formats of data and character sets.
• Control Flow Utilities: This category has packages that allow subroutines to have pre- and post-call hooks, tracers for interfaces for function callbacks, etc.
• Data Type Utilities: There are modules that implement a large number of mathematical functions and capabilities. There are modules that provide persistent data types. There are modules that create and help access data structures such as trees, graphs and heaps. There are modules that serialize complex data types into strings.
• Database Interfaces: It contains modules for interfacing with a large number of databases: MySQL, Postgresql, Sybase, Oracle, etc.
• Development Support: There are a large number of modules to help those who develop Perl programs. There are modules to help write Perl modules—in pure Perl or in C. There are modules to help perform version control.
• File Handle: Input and output
• Images, Pixmaps and Bitmaps: These include modules to create and edit charts, graphs, and drawings. There are modules that play MP3 music, creat VRML, edit images, etc.
• Internationalization and Locale: This category includes modules that deal with the Unicode, letter codes for countries of the world and states of the US, codes for the world’s languages, sorting strings in various ways, etc.
• Programming Language Interfaces
• Mail and Usenet News: This contains modules that can be used to handle interaction with the mailer program on a machine. There are modules to read POP3 mail messages, filter mail messages, etc. There are also modules for posting newsgroup articles, scan newsgroups, post articles, etc.
• Microsoft Windows Modules
• Networking Devices and IPC: A large number of modules to help inter-process communication, and implement various networking tasks such as DNS and Bind, FTP, Remote Procedure Calls (RPC), Remote Method Invocation (RMI), capture network packets, help program with sockets, etc.
• Operating System Interfaces: There are a large number of modules for interacting with various operating systems such as Macintoshes, OS2, Unix, SGI machine, MSDOS machines, Windows machines, etc.
• Optional arguments, parameters and procedures
• Perl Core Modules: These are modules that come with the standard Perl distribution.
• Security and Encryption: There are a large number of cryptographic modules. There are also modules for prime number generation and random number generation. There are modules that assist in authentication in various ways such as passwords, message digests, PINs, Kerberos, etc. There are modules for creating a certificate authority.
• Server and Daemon Utilities
• String, Languages and Text Processing: There are modules that deal with natural language processing such as stemming words in English, deal with fonts, summarizing English text, etc.
• User Interfaces: There are modules that help create graphical user interfaces.
• World Wide Web, HTML, HTTP, CGI: There are a large number of modules to maintain Web sites, mirror Web sites, parse and create HTML and XML pages, perform HTTP protocol based communication to help write Web clients, and write CGI program.
