Why I Use Perl...and Will Continue to Do So
drdobbs.com
drdobbs.com
I moved from awk to perl (for my scripting) around 2000, while using Java at work. However, I moved to ruby in 2004. I remember finding perl's @array and $array[n] being quite irksome. Anyway, I am thinking of revisiting perl for large shell-script apps, and I'd like to know of the most popular modules. (my work is command line/shell related, not web/Rails).
Do you have any template for your perl apps you can share. Have you put any apps up on github ?
CPAN Modules themselves often serve as a decent template for the form and structure of a Perl application and tests, see the App:: space for standalone applications (e.g. App::cpanminus).
If you're returning to Perl (or just starting out) you can do worse than check out Beginning Perl[1] and Modern Perl[2].
There are also Perl distributions such as DWIM Perl[3] which bundle Perl and the most commonly used modules.
[0] http://niceperl.blogspot.co.il/search/label/cpan
[1] http://ofps.oreilly.com/titles/9781118013847/
I am wary of generally downloading modules from CPAN since I have already earlier found some to be broken, or have dependencies that are abandoned. Which is why I sort of look for a curated list that is likely to be maintained. I;ve had the same issues with ruby and other languages as well, and am careful of what I depend on. Currently, I've been bitten by ruby's unicode issues (string functions crashing out of the blue in 1.9) and am thus considering going back to perl.
While Perl's unicode support is unparalleled, there are some things to be aware of:
http://www.perl.com/pub/2012/04/perlunicook-standard-preambl...
For eg. on TryCatch (https://metacpan.org/module/TryCatch) it currently shows... Test results (1933 / 172 / 1)
This means its tests have passed on 1933 different test machines (on various different versions of Perl & OS's). However there have been 172 machines reporting a problem. Clicking on the Test results link delves down deeper - http://www.cpantesters.org/distro/T/TryCatch.html#TryCatch-1...
From this I can see there are a lot of failures with this (version of the) module recently. So there is a new problem that's manifested itself recently in a small number of tests - http://www.cpantesters.org/cpan/report/42fb1e6c-749d-11e2-8c...
Looking at the test failure (it failed 6 out of 58 tests) I think it was fine to just force installation for now. The module owner will receive an email for everyone of these 172 smoke test failures so I doubt it will be long before he/she fixes this problem :)
* MetaCPAN favourites leaderboard - https://metacpan.org/favorite/leaderboard
* Task::Kensho - This is a list of recommended modules for Enlightened Perl development - https://metacpan.org/module/Task::Kensho
* Perl Best Practices CPAN module recommendations (outdated so read the notes) - http://www.perlfoundation.org/perl5/index.cgi?pbp_module_rec...
So starting from ground zero you could do...
$ curl -kL http://install.perlbrew.pl | bash
$ perlbrew install perl-5.16.2
$ perlbrew switch 5.16.2
$ perlbrew install-cpanm
$ cpanm --force TryCatch [1]
$ cpanm Task::Kensho
Above took approx 30 mins to complete on my Mac here and gives you...- Perlbrew which allows you to have multiple versions of Perl running from your home directory/folder - http://www.perlbrew.pl
- cpanminus (cpanm) integrated with Perlbrew to manage your CPAN modules per Perl version - https://metacpan.org/module/App::cpanminus
- Perl 5.16.2 with the (basic) Task::Kensho modules loaded.
[1] - There is currently a problem with a few tests on TryCatch so forcing this through first meant there were no hiccups with Task::Kensho install.