Perl and Its Community


Visit Modern Perl to download your own copy of this book or buy Modern Perl at Amazon.
Perl's greatest accomplishment is the huge amount of reusable libraries it has available. Larry Wall explicitly encouraged the Perl community to create and maintain their own extensions to solve every problem imaginable without fragmenting the language into incompatible pidgins. It worked.

That technical accomplishment was almost as important as the growth of a community around Perl. People write libraries. People build on the work of other people. People make a community worth joining and preserving and expanding.

The Perl community welcomes willing participants at all levels, from novices to the developers of Perl itself. Take advantage of the knowledge and experience and code of countless other programmers, and you'll become a better programmer.

The CPAN

Perl is a pragmatic language. If you have a problem, chances are the global Perl community has already written—and shared—code to solve it.

Modern Perl programming relies on the CPAN (http://www.cpan.org/). The Comprehensive Perl Archive Network is an uploading and mirroring system for redistributable, reusable Perl code. It's one of the largest libraries of code in the world. You can find everything from database access to profiling tools to protocols for almost every network device ever created to sound and graphics libraries and wrappers for shared libraries on your system.

Modern Perl without the CPAN is just another language. Modern Perl with the CPAN is a powerful toolkit for solving problems.

CPAN hosts distributions, or collections of reusable Perl code. A single distribution can contain one or more modules: self-contained libraries of Perl code. Each distribution occupies its own CPAN namespace and provides unique metadata.

The CPAN is Big, Really Big

The CPAN adds hundreds of registered contributors and thousands of indexed modules in hundreds of distributions every month. Those numbers do not take into account updates. In May 2015, search.cpan.org reported 12207 uploaders, 150552 modules, and 31873 distributions (representing growth rates of 10.8%, 16.7%, and 9.6% since the previous edition of this book, respectively).

The CPAN itself is merely a mirroring service. Authors upload distributions to a central service (PAUSE) which replicates them to mirror sites from which CPAN clients download them. All of this relies on common behavior; community standards have evolved to identify the attributes and characteristics of well-formed CPAN distributions. These include:

Additional CPAN services provide comprehensive automated testing and reporting across platforms and Perl versions. Every CPAN distribution has its own ticket queue on http://rt.cpan.org/ for reporting bugs and working with authors. CPAN sites also link to previous distribution versions, module ratings, documentation annotations, and more. All of this is available from both http://search.cpan.org/ and http://metacpan.org/.

Modern Perl installations include a client to connect to, search, download, build, test, and install CPAN distributions; this is CPAN.pm. With a recent version (as of this writing, 2.10 is the latest stable release), module installation is reasonably easy. Start the client with:

    $ cpan

To install a distribution within the client:

    $ cpan
    cpan[1]> install Modern::Perl

... or to install directly from the command line:

    $ cpan Modern::Perl

Eric Wilhelm's tutorial on configuring CPAN.pm http://learnperl.scratchcomputing.com/tutorials/configuration/ includes a great troubleshooting section.

CPAN Management Tools

If your operating system provides its own Perl installation, it may be out of date or depend on specific versions of CPAN distributions. Serious Perl developers often construct virtual walls between the system Perl and their development Perl installations. Several projects help to make this possible.

The App::cpanminus CPAN client is fast and simple and needs no configuration. Install it with cpan App::cpanminus, or:

    $ curl -LO http://xrl.us/cpanm
    $ less cpanm # review the code before running
    $ chmod +x cpanm
    $ ./cpanm

App::perlbrew is a system to manage and to switch between your own installations of multiple versions and configurations of Perl. Installation is as easy as:

    $ curl -LO http://xrl.us/perlbrew
    $ less perlbrew # review the code before running
    $ chmod +x perlbrew
    $ ./perlbrew install
    $ perldoc App::perlbrew

The local::lib CPAN distribution allows you to install and to manage multiple Perl installations. This is an effective way to maintain CPAN distributions for individual users or applications without affecting the system as a whole. See https://metacpan.org/pod/local::lib and https://metacpan.org/pod/App::local::lib::helper for more details.

All three projects tend to assume a Unix-like environment. Windows users, see the Padre all-in-one download (http://padre.perlide.org/download.html).

Community Sites

Perl's homepage at http://www.perl.org/ links to documentation, source code, tutorials, mailing lists, and several important community projects, such as the Perl.org Online library (https://www.perl.org/books/library.html). If you're new to Perl, the Perl beginners mailing list is a friendly place to ask novice questions and get accurate and helpful answers. See http://learn.perl.org/faq/beginners.html.

The home of Perl development is http://dev.perl.org/, which links to relevant resources for Perl's core development.

The CPAN's (The CPAN) central location is http://www.cpan.org/, though experienced users spend more time on http://search.cpan.org/ and https://metacpan.org/. Get used to browsing here for freely available libraries.

Several community sites offer news and commentary. http://blogs.perl.org/ is a free blog platform open to any Perl community member.

Other sites aggregate the musings of Perl hackers, including http://perlsphere.net/, http://PerlTricks.com/, and http://ironman.enlightenedperl.org/. The latter is part of an initiative from the Enlightened Perl Organization (http://enlightenedperl.org/) to increase the amount and improve the quality of Perl publishing on the web.

Perl Weekly (http://perlweekly.com/) offers a weekly take on news from the Perl world. @perlbuzz (https://twitter.com/perlbuzz) regularly tweets new Perl links.

Development Sites

Best Practical Solutions (http://bestpractical.com/) maintains an installation of RT, its popular request-tracking system, for Perl development. Perl's queue is http://rt.perl.org/. Every CPAN distribution has its own queue on http://rt.cpan.org/.

The Perl 5 Porters (or p5p) mailing list is the focal point of the development of Perl. See http://lists.cpan.org/showlist.cgi?name=perl5-porters.

The Perl Foundation (http://www.perlfoundation.org/) exists to support the development and promotion of Perl and its community.

Many Perl hackers use Github http://github.com/ to host their projects, including the sources of this book http://github.com/chromatic/modern_perl_book/. See especially Gitpan http://github.com/gitpan/, which hosts Git repositories chronicling the complete history of every distribution on the CPAN.

A Local Git Mirror

GitPAN receives infrequent updates. As an alternative to hacking CPAN distributions from GitPAN, consider using Yanick Champoux's wonderful Git::CPAN::Patch module to create local Git repositories from CPAN distributions.

Events

The Perl community holds countless conferences, workshops, seminars, and meetings. In particular, the community-run YAPC—Yet Another Perl Conference—is a successful, local, low-cost conference model held on multiple continents. See http://yapc.org/.

Hundreds of local Perl Mongers groups get together frequently for technical talks and social interaction. See http://www.pm.org/.

IRC

When Perl mongers can't meet in person, many collaborate and chat online through the textual chat system known as IRC. The main server for Perl community is irc://irc.perl.org/. Be aware that the channel #perl is a general purpose channel for discussing whatever its participants want to discuss. Direct questions to #perl-help instead. Many of the most popular and useful Perl projects have their own IRC channels, such as #moose and #catalyst; you can find mention of these channels in project documentation.

to the index