Home

Awesome

Language Perl PullRequestClub

perlres

List of resources about Perl :dromedary_camel:

Perl 5 Raptor

Perl 5 raptor from kraih, licence CC-BY-SA 4.0

:clipboard: Summary

Derived from LinuxFR french article Pour tout savoir du Perl post-moderne.

As a reminder, Perl is a general-purpose programming language created in 1987 by Larry Wall.
Perl officially stands for Practical Extraction and Report Language, except when it doesn't
whereas unofficially for Pathologically Eclectic Rubbish Lister.
Nicknamed "the Swiss Army chainsaw of scripting languages".

"Perl continues to flourish into its fourth decade thanks to a vibrant community of users and developers" (dixit perldelta)

Perl is distributed under a dual licence : Artistic Licence and GPL v1+. Most of CPAN modules follow the same rule.


:construction_worker: Perl core development

:necktie: Official

:hammer_and_pick: Distributions, modules and installers

:dromedary_camel: General

:fuelpump: Around the CPAN

:beers: Social

Community

(See also Perl Mongers)

Newsfeeds

Blogging

Conferences

:book: Official documentation

Perl regex

:us: Tutorials

:fr: Tutorials in French

:es: Tutorials and related resources in Spanish

:vibration_mode: Interactive tutorials

:school: Tutorials meta-site

:card_index: Perl features by version

:trollface: Perl folklore

:jack_o_lantern: Perl Ecosystem

News and forums engines

CMS

Blogging

Mailing lists engines

Email filtering

Communication

Monitoring

Logs analyzers

Job queues

Tickets trackers

Wiki

E-Commerce

Backup tools

Games

Web application frameworks

PSGI adapters and web servers

Templating

Compiler and alternative interpreters

Perl Application Bundlers / Packagers

Assets management

Git

Database tooling

IDE

Continuous Integration

Desktop Applications

Desktop Applications Development

Tooling for Devs

Sysadmin

Hosting

Vanity

Uncategorized

Other Perl lists

:ghost: Execute Perl online

:boom: Execute Perl online (sites not dedicated to Perl)

:bear: Lint Perl online

:books: Books

Other books :jp:

Other books :fr:

:rocket: Develop with Perl

:arrow_down: Install CPAN modules

The modern way is to use cpanm (cpanminus). The tool is able to get the requested module and resolve dependencies. For instance, to install the excellent module XML::LibXML from Shlomif which is a wrapper of libxml2, we can do sudo cpanm XML::LibXML, that produces the following output (truncated) :

--> Working on XML::LibXML
Fetching http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0201.tar.gz ... OK
==> Found dependencies: Alien::Libxml2
--> Working on Alien::Libxml2
Fetching http://www.cpan.org/authors/id/P/PL/PLICEASE/Alien-Libxml2-0.09.tar.gz ... OK
[...]
Building and testing Alien-Libxml2-0.09 ... OK
Successfully installed Alien-Libxml2-0.09
Configuring XML-LibXML-2.0201 ... OK
Building and testing XML-LibXML-2.0201 ... OK
Successfully installed XML-LibXML-2.0201 (upgraded from 2.0128)
13 distributions installed

Reinstalling a set of CPAN modules can be done simply by launching a bunch of cpanm commands or by specifying dependencies in a cpanfile (and using then carton or cpanm --installdeps . for the setup).

:heavy_check_mark: Linters

Executable by hand or directly integrated in your scripts, IDE or editors (vim users : ale or syntastic).

use strict;
print "toto" }{

And perl -c bad.pl prints :

Unmatched right curly bracket at bad.pl line 3, at end of line
syntax error at bad.pl line 3, near ""toto" }"
Missing right curly or square bracket at bad.pl line 3, at end of line
bad.pl had compilation errors.

But perlcritic bad.pl tells us that everything is fine bad.pl source OK (but is not happy with the missing use strict).

Data for 2017-09-22
B::Lint was first released with perl 5.005, deprecated (will be CPAN-only) in v5.17.9 and removed from v5.19.0

If a module goes out of core distribution it's not dramatic as it continues to be available in CPAN of course.

:hammer_and_pick: How to compile perl

See how to compile perl

Actually it will give this :

wget https://www.cpan.org/src/5.0/perl-5.30.0.tar.gz
tar -xzf perl-5.30.0.tar.gz
cd perl-5.30.0
./Configure -des -Dprefix=$HOME/localperl
make
make test
make install

:pill: Compile modules

If we decide to use or not a module like cpanm, at the end the module is compiled using ExtUtils::MakeMaker or Module::Build. ExtUtils::MakeMaker is a core module, while Module::Build was added then removed (5.9 → 5.19). David Golden explains in a blog post why he requested to remove Module::Build.

ExtUtils::MakeMaker

The module ExtUtils::MakeMaker generate a Makefile from Makefile.PL :

perl Makefile.PL
make
make install

Module::Build

The module Module::Build serves the same goal but generates a file Build from the file BUILD.PL :

perl Build.PL
./Build
./Build test
./Build install

:headphones: How to contribute ?

Please read CONTRIBUTING.md

:bow: Contributors

Thank you to all the fantastic contributors :heartpulse: