PREVIOUS  TABLE OF CONTENTS  NEXT 

New Modules

Jon Orwant

A module, for those of you who don't know, is a self-contained package of Perl code designed for re-use and placed in a file ending in .pm. The module's contents are imported into your program when you use() it. There's a worldwide, replicated repository of free modules called the CPAN (for Comprehensive Perl Archive Network, modeled after TeX's CTAN), so when someone writes a subroutine to, say, decode Base 64-encoded text, he or she can upload the module to the CPAN for everyone's benefit.

In futue issues, this column that will provide brief descriptions of the latest modules. But to launch the column, I'll serve up a CPAN buffet: a listing of the all the CPAN bundles and a sampling of modules from each. The modules I've chosen aren't necessarily the most popular or the most useful, but those most likely to give you an inkling of what you'll find when you browse through the hundreds of modules available. Be sure to check the exhaustive (90K) module list, tirelessly edited by Tim Bunce and Andreas König. You can find copies at:

ftp://rtfm.mit.edu/pub/usenet/news.answers/perl-faq/module-list

http://www.perl.com/CPAN/modules/00modlist.long.html

Perl Core Modules, Perl Language Extensions, and Documentation Tools: English, Filter::decrypt, Safe, Pod::HTML

Development Support: Benchmark, Test::Peek, Devel::DProf, Make

Operating System Interfaces: MSDOS::SysCalls, SGI::SysCalls, Mac::AppleEvents, OS2::ExtAttr, BSD::Resource, Sys::Hostname, Quota, Shell, POSIX, Ioctl, Fcntl, Env

Networking, Device Control (modems), Interprocess Communication: Socket, Net::Ping, IPC::Open2, DCE::Registry

Data Types and Data Type Utilities: Math::ematica, Date::Parse, Object::Info, Math::BigFloat, Time::ParseDate, Data::Dumper

Database Interfaces: Oraperl, Sybase::DBlib, GDBM_File

User Interfaces (Character and Graphical): Term::Complete, Term::ReadKey, Term::Gnuplot, Curses, Tk, Motif

Interfaces to or Emulations of Other Programming Languages: Tcl, C::Scan, Language::Prolog

File Names, File Systems and File Locking (see also File Handles): File::Find, File::Basename, File::Checktree, File::Lock

String Processing, Language Text Processing, Parsing and Searching: String::Approx, String::Edit, Text::Abbrev, Anagram, Font::AFM

Option, Argument, Parameter and Configuration File Processing: Getopt::Long, Getopt::Regex, Resources

Internationalization and Locale: Locale::gettext, I18N::Collate

Authentication, Security and Encryption: PGP, MD5, DES, SHA

World Wide Web, HTML, HTTP, CGI, MIME: CGI::Imagemap, HTML::QuickCheck, HTTP::Message, HTTPD::UserAdmin

Server and Daemon Utilities: EventServer, Server::Echo::UdpD

Archiving, Compression and Conversion: Convert::UU

Images, Pixmap and Bitmap Manipulation, Drawing and Graphing: Image::Size, GD, OpenGL, PGPlot

Mail and Usenet News: Mail::Address, News::Newsrc

Control Flow Utilities (e.g. callbacks and exceptions): Callback

File Handle, Directory Handle and Input/Output Stream Utilities: IO::Handle, IO::Pipe, FileCache, DirHandle

Microsoft Windows Modules: Win32::OLE, WinNT

Miscellaneous Modules: Archie, Neural, Logfile, Roman, CreditCard

The Comprehensive Perl Archive Network

Secure your place in the Perl pantheon by writing a module of your own and contributing to the CPAN: http://www.perl.com/CPAN/modules/04pause.html for details. Tim and Andreas' module list contains some excellent tips about how to write, document, and name your module.

You probably already have a few of the modules listed here, such as English, POSIX, Env, Math::BigFloat, and Socket. They're bundled with the standard Perl distribution, and you can find them in your lib directory. The location of lib depends on your Perl configuration; execute perl -e 'print "@INC"' to see where your Perl looks for modules, or use the Config module to see where modules were installed on your system: perl -e 'use Config; print $Config{privlib}'.

If your module is stable and of general interest to Perl programmers, let me know by sending a brief description (no more than a short paragraph) to perl-journal-submissions@perl.com for inclusion in this column.

__END__


PREVIOUS  TABLE OF CONTENTS  NEXT