Article 21478 of comp.lang.perl:
Xref: feenix.metronet.com comp.lang.perl:21478
Newsgroups: comp.lang.perl
From: Tim.Bunce@ig.co.uk (Tim Bunce)
Path: feenix.metronet.com!news.ecn.bgu.edu!psuvax1!news.pop.psu.edu!news.cac.psu.edu!howland.reston.ans.net!pipex!demon!ig.co.uk!timbo
Subject: The Perl 5 Modules List (long)
Followup-To: Tim.Bunce@ig.co.uk
Organisation: Paul Ingram Group, Software Systems, +44 483 424424
Date: Wed, 12 Oct 1994 20:13:05 +0000
Message-ID: <CxKtHt.9u0@ig.co.uk>
Sender: usenet@demon.co.uk
Lines: 548

This has been bounced around the perl5-porters mailing list for awhile now.
I am posting it here now, before Perl 5 is fully released, in order to
encourage anyone who is developing a Perl 5 module to submit an entry
to be added to the list.
 
The guideines section of this document may be split off into some part
of the Perl 5 documentation. I present them both together here for your 
information and comments. 
 
Regards,
Tim Bunce.


--- cut here ---


The Perl 5 Modules List
-----------------------

This is $Revision: 1.10 $, last updated on $Date: 1994/10/12 20:04:03 $.
Maintained by Tim Bunce <Tim.Bunce@ig.co.uk>


Introduction
------------

This document is a semi-formal list of Perl 5 Modules. The Perl 4
concept of packages has been extended in Perl 5 and a new standardised
form of reusable software component has been defined: the Module.

Perl 5 Modules typically conform to certain guidelines which make them
easier to use, reuse, integrate and extend.

This list is (or will be) posted to comp.lang.perl on a semi-regular
basis.  It has two key aims:

 1. For developers: To change duplication of effort into cooperation.

 2. For users: To quickly locate existing software which can be reused.

This list includes the Perl 5 standard modules, other completed modules,
work-in-progress modules and would-be-nice-to-have ideas for modules.
It also includes guidelines for those wishing to create new modules
including how to name them.


Perl 5 Module Terminology (a larry-terminology-mini-tutorial)
-------------------------

Perl 5 implements a class using a package, but the presence of a
package doesn't imply the presence of a class.  A package is just a
namespace.  A class is a package that provides subroutines that can be
used as methods.  A method is just a subroutine that expects, as its
first argument, either the name of a package (for "static" methods),
or a reference to something (for "virtual" methods).

A module is a file that (by convention) provides a class of the same
name (sans the .pm), plus an import method in that class that can be
called to fetch exported symbols.  This module may implement some of
its methods by loading dynamic C or C++ objects, but that should be
totally transparent to the user of the module.  Likewise, the module
might set up an AUTOLOAD function to slurp in subroutine definitions on
demand, but this is also transparent.  Only the .pm file is required to
exist.


Simple Guidelines for Module Creation
-------------------------------------

1. Do similar modules already exist in some form?

   If so, please try to reuse the exisiting modules either in whole or
   by inheriting useful features into a new class.  If this is not
   practical try to get together with the module authors to work on
   extending or enhancing the functionality of the exisiting modules.
   A perfect example is the plethora of packages in perl4 for dealing
   with command line options.

   If you are writing a module to expand an already exisiting set of
   modules, please cooridinate with the author of the package.  It
   helps if you follow the same naming scheme and module interaction
   scheme as the original author.

2. Try to design the new module to be easy to extend.

   Use blessed references. Inherit methods from other modules. Avoid
   $r->Class::func() where using @ISA=qw(... Class ...) and $r->func()
   would work (see Doc/bot.pod for more details). Pass arrays to
   functions as references so more parameters can be added later (it's
   also faster). Split large functions into smaller more flexible ones.
   Use autosplit so little used or newly added functions won't be a
   burden to programs which don't use them.

3. Select what to export.

   Do not export something by default without a good reason.  Exports
   pollute the namespace of the module user. Use @EXPORT_OK in
   preference to @EXPORT.

   If you're using blessed references you do not need to export the
   methods. Anything not exported is still accessible from outside the
   module using the ModuleName::item_name syntax. Avoid common names
   for exported items to reduce the risk of name clashes.

4. Select a name for the module.

   This name should be as descriptive, accurate and complete as possible.
   Avoid any risk of ambiguity. Always try to use two or more words.
   Please used nested module names to group or categorise a module.

   Having 57 modules all called Sort will not make life easy for anyone
   (though having 23 called QuickSort is only marginally better :-).
   Imagine someone trying to install your module alongside many others.
   If in any doubt ask for suggestions in comp.lang.perl.

   If you are developing a suite of related modules/classes it's good
   practice to use nested classes with a common prefix as this will
   avoid namespace clashes. For example:  Xyz::Control, Xyz::View,
   Xyz::Model etc.

   If adding a new module to a set, follow the original author's
   standards for naming modules and the interface to methods in
   those modules.

   To be portable module names should be limited to 11 characters (if
   it might be used on DOS then try to ensure it's unique in the first
   8 characters).

5. Give the module a version/issue/release number.

   Add a function or method to retrieve the number. Use the number in
   announcements and archive file names when releasing the module
   (ModuleName-1.2.tar.Z). See ExtUtils::MakeMaker.pm for details.

6. Take care when changing a released module.

   Always strive to remain compatible with previous released versions.
   Otherwise try to add a mechanism to revert to the old behaviour.


Simple Guidelines for Converting Perl 4 Library Scripts into Modules
--------------------------------------------------------------------

1. There is no requirement to convert anything.

   If it ain't broke, don't fix it! Perl 4 library scripts should
   continue to work with no problems. You may need to make some minor
   changes (like escaping non-array @'s in double quoted strings) but
   there is no need to convert a .pl file into a Module for just that.

2. Consider the implications.

   All the perl applications which make use of the script will need to
   be changed (slightly) if the script is converted into a module.  Is
   it worth it unless you plan to make other changes at the same time?

3. Make the most of the opportunity.

   If you are going to convert the script to a module you can use the
   opportunity to redesign the interface. The 'Guidelines for Module
   Creation' above include many of the issues you should consider.

4. The pl2pm utility will get you started.

   This utility will read *.pl files (given as parameters) and write
   corresponding *.pm files. The pl2pm utilities does the following:
   - Adds the standard Module prologue lines
   - Converts package specifiers from ' to ::
   - Converts die(...) to croak(...)
   - Several other minor changes
   Being a mechanical process pl2pm is not bullet proof. The converted
   code will need careful checking, especially any package statements.
   Don't delete the original .pl file till the new .pm one works!


Simple Guidelines for Reusing Application Code
----------------------------------------------

1. Complete applications rarely belong in the Perl Module Library.

2. Many applications contain some perl code which could be reused.

3. Break-out the reusable code into one or more separate module files.

4. Take the opportunity to reconsider and redesign the interfaces.

5. In some cases the 'application' can then be reduced to a small
   fragment of code built ontop of the resuable modules. In these cases
   the application could invoked as:
       perl -e 'use Module; method(@ARGV)' ...
   See the AutoSplit module for an example.


=======================================================================
Editorial Information

This document is Copyright (c) 1994 by Tim Bunce. Permission is hereby
granted to give away free copies.  You may distribute, transfer, or
copy this document.  This copyright notice and the disclaimer below
must be maintained in any copy made.

Disclaimer: The content of this document is simply a collection of
information gathered from many sources with little or no checking.
There are NO warranties with regard to this information or its use.

Help save the world! Please submit new entries and updates to me so I
can keep this list up-to-date. I would prefer changes to be submitted
as context diff's (or just plain diff if your diff does not have a
context diff option) by email to Tim.Bunce@ig.co.uk.


=======================================================================

Module Listing Format
---------------------

The remainder of this document is divided up into sections. Each
section deals with a particular topic and lists all known modules
related to that topic.  Modules are only listed in one section so
check all sections that might related to your particular needs.

Each Module listing is very short. The main goal is to simply publish
the existence of the modules, or ideas for modules, and enough contact
information for you to find out more. Each listing includes some
characters which convey basic status information.

For example:

Name           DSLI  Description                                  Info
-------------  ----  -------------------------------------------- -----
Fcntl          Sdcf  Defines fcntl() constants (see File::Lock)   JHI

Where the 'DSLI' characters have the following meanings:

  D - Development Stage (no implied timescale!):
    i   - Idea, listed to gain consensus or as a placeholder
    c   - under construction but pre-alpha
    a/b - Alpha/Beta testing
    R   - Released
    M   - Mature (no rigourous definition)
    S   - Standard, supplied with Perl 5

  S - Support Level:
    u   - Usenet newsgroup comp.lang.perl
    d   - Developer
    m   - Mailing-list
    n   - None known, try comp.lang.perl

  L - Language Used:
    p   - Perl-only, no compiler needed, should be platform independent
    c   - C and perl, a compiler will be needed
    o   - perl and another language other than C

  I - Interface Style
    f   - plain Functions, no references used
    r   - some use of unblessed References or ties
    O   - Object oriented using blessed references and/or inheritance

Where letters are missing they can usually be inferred from the
others.  For example 'i' implies 'id', 'S' implies 'Su'.

The Info column gives a contact reference 'tag'. Lookup this tag in the
"Information / Contact Reference Details" section at the botton of the
document.  If no contact is given always try asking in comp.lang.perl.

Most Modules are nested in categories such as IPC::Open2 and IPC::Open3.
These are shown as 'IPC::' on one line then each module listed below
with a '::' prefix.

Modules listed as in the 'i' Development Stage with no contact
reference are ideas without an owner. Feel free to 'adopt' these but
please let me know so that I can update the list and thus inform anyone
else who might be interested. Adoption simply means that you intend to
implement the module or would like to work closely with anyone else who
wants to implement it.

Similarly, if an idea that interestes you has been adopted by someone
please contect them so you can share ideas.  Just because an idea has
been adopted does not imply that it's going to be implemented. Waiting
silently in the hope that the Module will appear one day is unlikely to
be fruitful!

All the information corresponds to the latest update I have received.
I don't record the version number or release dates of the listed
Modules. Nor do I record the locations of these Modules. Consult the
contact, try the usual perl archive sites or ask in comp.lang.perl.
Please do *not* ask me directly, I simply don't have the time. Sorry.


=======================================================================
Perl Core Modules

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
AutoLoader     Sup   Automatic perl module method loader
DynaLoader     Suc   Dynamic loader for shared libraries
Exporter       Sup   Implements default import method for modules
Carp           Sup   Throw exceptions outside current package
Config         Sup   Stores details of perl build configuration
English        Sup   Defines English names for special variables
strict         Sup   Controls averments (similar to pragmas)
integer        Sup   Controls float vs. integer arithmetic
less           Sup   Controls optimisations: 'use less memory;'
subs           Sup   "use subs qw(x y)" is short for "sub x; sub y;"
TieHash        Sup   Base class for implementing tied hashes


=======================================================================
Development Support

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
AutoSplit      Supf  Splits modules into files for AutoLoader
Benchmark      Supf  Easy way to time fragments of perl code

ExtUtils::
::MakeMaker    SupO  Writes Makefiles for extensions
::DynaGlue     i     Utilities/glue code for C<->Perl interfaces

Test::
::Harness      Sup   Executes perl-style tests

Devel::
::Profile      i     Execution profiler and test coverage checker
::Debug        i     Function and class debugging support



=======================================================================
Operating System Interfaces

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
POSIX          SupO  An interface to most (all?) of POSIX.1
Fcntl          bdcf  Defines fcntl() constants (see File::Lock)   JHI
Errno          i     Constants from <errno.h> EACCES, ENOENT etc  JHI

BSD::
::Remote       adpf  getrusage(), s/getrlimit(), s/getpriority()  JHI
::HostIdent    adpf  s/gethostname(), s/gethostid()               JHI

Sys::
::Hostname     Supf  Implements a portable hostname function
::Syslog       Supf  Provides the same functionality as BSD syslog


=======================================================================
Networking, Device Control (modems etc) and Interprocess Communication

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
Socket         Sucf  Defines all socket-related constants

Net::
::Ping         Supf  Implements TCP/IP ping (currently only echo) PMQS
::IRC          i     Internet Relay Chat interface                MRG
::FTP          idpf  Implements File Transfer Protocol interface  GSPAF
::Telnet       i
::SOCKS        i     TCP/IP access through firewalls using SOCKS  WSCOT
::NIS          cdcO  Interface to Sun's NIS                       RIK
::NISPlus      cdcO  Interface to Sun's NIS+                      RIK


IPC::
::Open2        Supf
::Open3        Supf
::Chat2        ?     Out-of-service during refit!
::SysV         i     shared memory, semaphores, messages etc      JHI
::Mmap         i     Interface to Unix's mmap() shared memory

Proxy::        adpO  Transport-independent remote processing      MICB
::Tk           aucO  Tk transport class for Proxy (part of Tk)    MICB


=======================================================================
Data Types and Data Type Utilities (see also Database Interfaces)

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
Math::
::BigInt       SupO  Arbitrary size integer math package          MB
::BigFloat     ?
::BigRat       ?
::Complex      adpO  Complex number data type                     DNAD

Array::
::Vec          idp   Implement array using vec()                  LWALL
::Substr       idp   Implement array using substr()               LWALL
::Virtual      idp   Implement array using a file                 LWALL

Time::
::Local        Supf  Implements timelocal() and timegm()
::Time         adcf  High resolution timers and time-of-day       JHI
::Date         idpO  Lightweight normalised datetime data type    TPB
::Interval     idpO  Lightweight normalised interval data type    TPB

Tie::
::ShiftSplice  i     Defines shift et al in terms of splice       LWALL
::Quick        i     Simple way to create ties                    TPB
::Watch        i     Uses Tie::Quick to watch a variable          TPB

Eroot          bdpO  Eternal Root.  Object persistence.           DMR
Class          bdpr  Struct/member template builder.              DMR


=======================================================================
Database Interfaces (see also Data Types)

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
DBI            amcO  Generic Database Interface (see DBD modules) DBPRL
DBD::
::Ingres       cmcO  Ingres Driver for DBI                        TPB
::Oracle       cmcO  Oracle Driver for DBI                        TPB
::Msql         cdcO  Msql Driver for DBI                          ANDK
::DB2          cdcO  DB2 Driver for DBI                           MHM
::Sybase       idcO  Sybase Driver for DBI                        MEWP

SybaseDB       adcf  Sybase DBlibrary interface                   MEWP
MSQL           adcf  Mini-SQL, a light weight SQL database        ANDK

Tied Hash File Interfaces:

NDBM_File      Suc   Tie interface to NDBM files
DB_File        Suc   Tie interface to DB files                    PMQS
GDBM_File      Suc   Tie interface to GDBM files
SDBM_File      Suc   Tie interface to SDBM files
ODBM_File      Suc   Tie interface to ODBM files
AnyDBM_File    Sup   Uses first available *_File module above

AsciiDB        adp   Generic text database parsing                MICB
Stanza         adp   Text format database used by OSF and IBM     JHI


=======================================================================
User Interfaces (character and graphical)

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
Term::
::Cap          Supf  Basic termcap: Tgetent, Tputs, Tgoto
::Info         adpf  Terminfo interface (currently just Tput)     KJALB
::Complete     Supf  Tab word completion using stty raw
::Readline     adc   GNU Readline, history and completion         ANDK
::Control      idpf  Basic curses-type screen controls (gotxy)    TYEMQ
::Read         cdcf  Terminal reading functions (getkey)          TYEMQ

Major User Interface Tools:

Curses         adcO  Character screen handling and windowing      WPS
Tk             adcO  X-Windows: Tk widgets ala Tk/Tcl             MICB
Sx             adc   X-Windows: Simple Athena interface           FMC


=======================================================================
File Names, File Systems, File Locking and File Handles

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
File::
::Basename     Supf  Return basename of a filename
::CheckTree    Supf  Check file/dir tree against a specification
::Find         Supf  Call func for every item in a directory tree
::Lock         adcf  File locking using flock() and lockf()       JHI
::KGlob        cdcf  Filename globing (ksh style)                 TYEMQ
::Attrib       idpO  Get/set file attributes (stat)               TYEMQ

Cwd            Supf  Current working directory functions
FileHandle     Supf  File handle manipulation functions


=======================================================================
Text Processing, Parsing and Searching

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
Text::
::Abbrev       Supf  Builds hash of all possible abbreviations
::ParseWords   Supf  Parse strings containing shell-style quoting
::Soundex      Supf  Convert a string to a soundex value
::CPP          i     A C preprocessor work-alike (for perl -P)

Search::
::Dict         Supf  Search a dictionary ordered text file


=======================================================================
Option Processing

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
Getopt::
::Std          Supf  Implements basic getopt and getopts
::Long         Supf  Advanced option handling                     JV


=======================================================================
Internationalization and Locale

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
I18N::
::Collate      bdpr  Locale based comparisons                     JHI
::WideMulti    i     Wide and multibyte character string          JHI


=======================================================================
Interfaces to Other Software Systems

Name           DSLI  Descrition                                   Info
-----------    ----  -------------------------------------------- -----
Mail::
::SMTP         i     Protocol support including expn
::RFC822       i     Functions for RFC822 address manipulations
::MH           adcr  MH mail interface                            MRG

News::


=======================================================================
Information / Contact Reference Details (in alphabetical order)

Ref    Contact Details
-----  ------------------------------------------------------
ANDK   Andreas Koenig <k@otto.ww.TU-Berlin.DE>
CLP    Usenet: comp.lang.perl, always a good place to enquire
DBPRL  DBperl mailing list. <perldb-interest@vix.com>
DMR    Dean Roehrich <roehrich@cray.com>
DNAD   Dave Nadler <nadler@apphpp2>
FMC    Frederic Chauveau <fmc@pasteur.fr>
GSPAF  Gene Spafford <spaf@cs.purdue.edu>
JHI    Jarkko Hietaniemi <Jarkko.Hietaniemi@hut.fi>
JV     Johan Vromans
KJALB  Kenneth Albanowski <kjahds@kjahds.com>
LWALL  Larry Wall. Author of Perl. Busy man. <lwall@netlabs.com>
MEWP   Michael Peppler <mpeppler@itf.ch>
MHM    Mike Moran <mhm@austin.ibm.com>
MICB   Malcolm Beattie <mbeattie@sable.ox.ac.uk>
MRG    Matthew Green <mrg@mame.mu.oz.au>
PMQS   Paul Marquess <pmarquess@bfsec.bt.co.uk>
RIK    Rik Harris <rik.harris@fulcrum.com.au>
TPB    Tim Bunce <Tim.Bunce@ig.co.uk>
TYEMQ  Tye McQueen <tye@metronet.com>
WPS    William Setzer <setzer@math.ncsu.edu>
WSCOT  Wayne Scott <wscott@ichips.intel.com>


End.


