Browsing CPAN

Chapter 1 - CPAN
by?Sam Tregar?
Apress ? 2002
has companion web siteCompanion Web Site

If this is your first time visiting CPAN, the first thing you should do is have a look around. On the entry screen (Figure 1-3) you'll find links to each section of the CPAN collection-modules, scripts, binaries, the Perl source, and other items. Also available are links to documentation about CPAN; if you still have questions after finishing this chapter, then you should give them a look.

click to expand
Figure 1-3: Entry screen for http://www.cpan.org.

I suggest you begin by entering the modules section of CPAN. This is by far the most useful area of the site and also the subject of this book. It's good to know where to find Perl, but you probably already know a thing or two about that if you're thinking about writing CPAN modules. Figure 1-4 shows the CPAN modules menu, where you'll find a number of different ways to navigate through the module collection.

click to expand
Figure 1-4: CPAN modules menu

The Module List

The Module List is a semi-manually maintained list of most of the Perl modules on CPAN. A section of the Module List is shown in Figure 1-5.

click to expand
Figure 1-5: The start of Database Interfaces section in the Module List

In many ways, its function has been superseded by the newer search interfaces detailed later in this chapter, but it does have some unique features that can be helpful. First, it organizes the modules into categories by function. These categories are listed here:

  • Module List Categories

  • Perl Core Modules, Perl Language Extensions, and Documentation Tools

  • Development Support

  • Operating System Interfaces, Hardware Drivers

  • Networking, Device Control, and Interprocess Communication

  • Data Types and Data Type Utilities

  • Database Interfaces

  • User Interfaces

  • Interfaces to or Emulations of Other Programming Languages

  • File Names, File Systems, and File Locking

  • String Processing, Language Text Processing, Parsing, and Searching

  • Option, Argument, Parameter, and Configuration File Processing

  • Internationalization and Locale

  • Authentication, Security, and Encryption

  • World Wide Web, HTML, HTTP, CGI, MIME, and so on

  • Server and Daemon Utilities

  • Archiving, Compression, and Conversion

  • Images, Pixmap, and Bitmap Manipulation

  • Mail and Usenet News

  • Control Flow Utilities

  • File Handle, Directory Handle, and Input/Output Stream Utilities

  • Microsoft Windows Modules

  • Miscellaneous Modules

  • Interface Modules to Commercial Software

  • Bundles

Secondly, each listing contains a DSLIP code that can give you some information about the status of the module. DSLIP stands for Development Stage, Support Level, Language Used, Interface Style, and Public License. For example, a DSLIP code of bmpOp specifies that the module is in beta testing (b), is supported by a mailing-list (m), is written in pure Perl (p), has an object-oriented interface (O) and is licensed under the same license as Perl (p). Table 1-1 lists the various DSLIP codes.

Table 1-1: Module List DSLIP codes

D-Development Stage

 

I

Idea


c

Under construction


a

Alpha testing


b

Beta testing


R

Released


M

Mature


S

Standard, comes with Perl 5


S-Support Levels

 

m

Mailing list


d

Developer


u

Usenet newsgroup comp.lang.perl.modules


n

None


L-Language Used

 

p

Perl-only


c

C and Perl


h

Hybrid, written in Perl with optional C code


+

C++ and Perl


o

Perl and another language other than C or C++


I-Interface Style

 

f

Plain functions


O

Object oriented


h

Hybrid, object, and function interfaces available


r

Unblessed references or ties


n

None


P-Public License

 

p

Standard Perl license (Artistic and GPL hybrid)


g

GPL (GNU General Public License)


l

LGPL (GNU Lesser General Public License)


b

The BSD License


a

Artistic license


o

Other (but distribution allowed without restrictions)

The biggest problem with the Module List is that it is incomplete, although this situation may be improved in the future.

Alternative Browsing Methods

An alternative to browsing the Module List is the "modules by" listings. You can browse modules grouped by author, by category, by name, and by recentness. The advantage to this method is that it deals directly with the directory structure of CPAN and as a result all available modules are accessible.

By Author

Upon entering the Modules By Author view, you see a directory listing with what appears to be a directory for every author on CPAN. This is misleading-the list you're seeing is a relic of the past. When CPAN started every author received an entry in this directory, but there's a limit to how many subdirectories a single directory can efficiently contain. These days there are far too many authors on CPAN to house them all in one directory, so CPAN switched to a multilevel hierarchy for storing author directories, which is used today.

To see the real list, open the file 00whois.html. There you'll find three pieces of information for each author-his or her CPAN ID, his or her full name, and his or her e-mail address. A CPAN ID is a unique identifier for CPAN authors-I'll show you how to apply for one in 5] you'll be taken to that author's CPAN directory, which contains all the modules he or she has uploaded to CPAN. Some authors have registered Web sites for themselves, and you can click their full names to visit these.

By Category

The By Category view brings you to a directory hierarchy based on the categories in the Module List, listed earlier in this chapter. Inside each category you have an interface similar to the Module By Name interface described next.

By Name

Navigating CPAN modules by name allows you to traverse the module names directly, where each :: is translated into a path separator. This can be helpful when you know part of the name for the module you're looking for and need to see a list of possibilities. If you know the exact name of a module, then the search interface described later in this chapter is a faster alternative.

By Recentness

The By Recentness view shows you the most recent 150 uploads to CPAN. The format is a bit nicer than the Recent Arrivals list available on the opening screen, but it's not as nice as the format provided by http://www.search.cpan.org.

[5]Some CPAN authors do not have CPAN directories. Their IDs will not be links.



Writing Perl Modules for CPAN
Writing Perl Modules for CPAN
ISBN: 159059018X
EAN: 2147483647
Year: 2002
Pages: 110
Authors: Sam Tregar

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net