www.cpan.org/modules/00modlist.long.html
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 has two key aims: FOR DEVELOPERS: To change duplication of effort into cooperation. 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. Most, but not all, of the modules can be found within CPAN, the Comprehensive Perl Archive Network of mirrored FTP sites. Within the CPAN scheme the modules described in this list can be found in the modules/ directory below the CPAN root directory.
Since PAUSE held a database of module information which could be maintained by module authors it made sense for the module listing part of the Module List to be built from that database. In April 1996 Andreas took over the automatic posting of the Module List and I now maintain the other parts of the text. Part 1 - Modules: Creation, Use and Abuse 1 Perl 5 Module Terminology Perl 5 implements a class using a package, but the presence of a package doesnt imply the presence of a class. 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.
If so, please try to reuse the existing 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 existing 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 existing set of modules, please coordinate with the author of the package. It helps if you follow the same naming scheme and module interaction scheme as the original author.
Many people evolve their style over several years as they learn what helps them write and maintain good code. Heres one set of assorted suggestions that seem to be widely used by experienced developers: Use underscores to separate words. It is generally easier to read $var_names_like_this than $VarNamesLikeThis, especially for non-native speakers of English. Its also a simple rule that works consistently with VAR_NAMES_LIKE_THIS. Perl informally reserves lowercase module names for pragma modules like integer and strict. Other modules normally begin with a capital letter and use mixed case with no underscores need to be short and portable. You may find it helpful to use letter case to indicate the scope or nature of a variable. For example: $ALL_CAPS_HERE constants only beware clashes with perl vars $Some_Caps_Here package-wide global/static $no_caps_here function scope my or local variables Function and method names seem to work best as all lowercase.
Second, if it does fail, you get a better diagnostic than just the undefinedness of the return value. In fact, the exception it throws may be quite rich in stacked error messages, if its rethrowing an exception caught further in. And you can always catch the exception if it does happen using eval . If, on the other hand, you expect your constructor to fail a goodly part of the time, then you shouldnt use exceptions, but you should document the interface so that people will know to check the return value. You dont need to use defined, since a constructor would only return a true reference or a false undef. So good Perl style for checking a return value would simply say $conn new Connection $addr or die Couldnt create Connection; In general, make as many things meaningful in a Boolean context as you can. Just write if do_your_thing Perl is designed to help you eschew obfuscation, if thats your thing.
If you insist on a name that we consider inappropriate, we wont prevent you from uploading your module - but itll remain in your author directory and wont be directly visible from CPAN/modules/by-module. We appreciate the efforts of the contributors who have helped make the CPAN the worlds largest reusable code repository. Please help us enhance it by working with us to choose the best name possible. If you are developing a suite of related modules/classes its good practice to use nested classes with a common prefix as this will avoid namespace clashes. If adding a new module to a set, follow the original authors standards for naming modules and the interface to methods in those modules. If developing modules for private internal or project specific use, that will never be released to the public, then you should ensure that their names will not clash with any future public module. You can do this either by using the reserved Local:: category or by using an underscore in the top level name like Foo_Corp::. To be portable each component of a module name should be limited to 11 characters. If it might be used on DOS then try to ensure each is unique in the first 8 characters.
In these cases the application could invoked as: 5 Namespace Coordination The maintainers of the module list are not the Internic for perl namespaces. They do neither sell namespaces nor can they establish property rights. What they try to do is to minimize namespace clashes and maximize usablility of the CPAN archive by setting up a catalogue of modules and control the indexers. Time permitting, they will also try to give advice for what they think is a proper usage of the namespace. It is an important part of the namespace concept that the module list maintainers do not guarantee to you that somebody else wont use the, say, Foo::Bar namespace. Instead, there are several levels of protection for your namespaces: a The most important is the module list which actually lists and proclaims your namespace.
A namespace Foo:: is just a package name and its relationship to a namespace Foo::Bar:: is not predetermined whatsoever. The two namespaces can be closely or loosely related or not related at all, but whats most important, they can be writen by different authors who may work rather independently from each other. So if you have registered any namespace, it does not mean that you own the whole namespace tree that starts there. If you are registered as the contact for Foo::Bar, you are not necessarily also associated with Foo::Bar::Baz.
For example: DBI:: under the control of Tim Bunce Sun:: under the control of Sun Microsystems Part 2 - The Perl 5 Module List 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. All the information corresponds to the latest updates we have received. We dont record the version number or release dates of the listed Modules.
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. Ideas For Adoption 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 we can update the list and thus inform anyone else who might be interested. Adoption simply means that you either hope to implement the module one day or would like to cooperate with anyone else who might be interested in implementing it. Cooperation Similarly, if an idea that interests you has been adopted by someone please contact them so you can share ideas. Just because an idea has been adopted does NOT imply that its going to be implemented. Just because a module is listed and being implemented does NOT mean itll get finished. Waiting silently in the hope that the Module will appear one day is unlikely to be fruitful! If youre interested in a module dont just wait ...
|