Adam

Become a Perl rockstar… AKA Perl link dump

by Adam on August 20, 2009

in Code

If you're new here, you may want to subscribe to my RSS feed. Or for more frequent updates you can follow me on Twitter. Thanks for visiting!

Perl Rockstar

Photo: I’m not a rockstar I’m a poseur.

I’m coding quite a lot of Perl again at the moment and I’ve been saving quite a lot of interesting Perl links to my delicious account which I’m going to share with you. They probably won’t make you a rockstar but it might improve your Perl knowledge.

Modules

Moose is a collection of Perl modules that add a new, more modern object framework to Perl 5.x. Programming with Moose is a wikibook that discuses the uses and use of Moose. Actually, apparently the official documentation on CPAN is a better resource for using Moose.

Mojo is a new Perl web framework based off the Catalyst framework. It is designed to have no/limited dependencies so that a Perl newbie can install and get going fairly quickly. It is still early days but it will be interesting to see how this develops.

N.B. I just heard some skeptical views about Mojo, especially with a recent release which will have broken many peoples Mojo apps as it was there were major changes in the code base but I do hope that it stabilises and do think it is worth keeping track of.

Higher Order Perl

HIgher Order Perl is a blog about Perl, computing, maths etc. I haven’t read it too much yet but I was planning to trawl through the archives at somepoint because I have a feeling it could be quite interesting (in a nerdy way).

Profiling

Profiling, not something I’ve had to do yet but it is the process of analysing your code to see which routines/loops/blocks could benefit from optimisation rather than blindly optimising what you think may be running slowly. Here is a general introduction into profiling perl and here is a perl module released by the NYT for profiling Perl code. I plan to give that a look should I need to do any profiling.

Prototypes

I’m not talking about little wooden miniatures, prototypes in Perl are like, what’s the word, parameter declarations in function declarations in other languages? Except actually, I think they’re not. Well anyway, I read a post about Perl prototypes, which was pretty confusing, so then I asked my buddy Kristian to explain. I also read another long article about prototypes. Needless to say I still don’t fully understand the implications but basically don’t declare your parameters, I think..?

Object Orientated Perl

Even though I wanted to use Moose (see above) I still needed an overview of object orientation in Perl, as I knew from previous experience it was a bit wierd – bless / self etc… There was a pretty nice article by Chromatic, including some stuff about using Moose and another article about blessing your father.

Module Creation

I’m currently writing a module that I’m hopefully going to release to CPAN when finished but I’d never done that before so I read José’s guide to creating Perl modules and a guide on Perlmonks. Also I looked into Module::Builder::PBP on CPAN.

Misc. Perl Links

Exception handling in Perl.
Writing serious Perl: The absolute minimum you need to know.
Namespaces & Scoping
A link checking spider (I do not condone copyright infringement but that is a useful link for me as I’ll be writing a Perl spider soon..)
Intro to Test::More (Googledoc/PDF)

That’s your lot for today, if there are other great Perl articles or blogs I’d love to know about them..

Related posts:

  1. Perl Ain’t Dead…
  2. Mad-Lib Perl Snippet
  3. Using TheSchwartz (Job Queue) with Catalyst
  4. Open Melody, Homebrew, Catalyst/Mojo and Sinatra.
  5. LWP::UserAgent and SSL

{ 8 comments… read them below or add one }

hobbs August 26, 2009 at 10:05 am

Look at NYTProf now, even before you need it. It takes zero effort to use it once it’s installed and it’s fantastic. Run with -d:NYTProf to save profiling data, run “nytprofhtml” to turn it into a nifty little webpage. That’s it! :)

Reply

Stevan Little August 26, 2009 at 2:36 pm

Actually, the Programming in Moose wikibook is not recommended, it is old and out of date and the author no longer seems to be maintaining it. Instead I would suggest you read the Moose::Manual pages which were written by Dave Rolsky with a grant from the Perl Foundation, they are much better overall and up to date.

Reply

Programmer August 26, 2009 at 4:01 pm

Or you could learn a more modern language and not have to read this much material before you can write maintainable code. Seriously, perl’s been dead for a while now.

Reply

Adam August 27, 2009 at 4:20 pm

@hobbs: thanks I will do ASAP.

@Stevan Little: thanks for the suggestion, I will update the links accordingly.

@Programmer: I think that is a bit unfair, it’s possible to write shoddy or decent code in any language and usually it is easier to write maintainable code if you follow the prescribed “best practices” – not necessarily of the language but at least programming generally.

The material and links aren’t about writing maintainable code per say it is just a collection of articles that may be useful if you are delving further into Perl.

That said, you’re entitled to your opinion and thanks for commenting.

Reply

Yuval Kogman August 28, 2009 at 6:31 pm

http://search.cpan.org/perldoc?Moose is a better URL for that link, you can generate one using the small “permalink” at the top right of the documentation body.

This will always link to the most recent version, instead of the one that is recent right now.

Oh and also, Perl is dead. Real men write PHP in C# nowadays.

Reply

Adam August 31, 2009 at 6:41 pm

@Yuval: Cheers I will update the link right now!

Reply

Shlomi Fish June 14, 2010 at 6:13 pm

Another useful and modern Perl resource is the Perl Beginners Site (Perl-Begin.org). It is a first-stop portal for Perl beginners (with some material that’s useful for more advanced Perlers), that is up-to-date and actively maintained and expanded, and is available with its source code under an open-content Creative Commons Attribution (CC-by) licence. I hope you like it.

Reply

Shlomi Fish June 14, 2010 at 6:15 pm

Oh, and I really like the photo you’ve placed here.

Reply

Leave a Comment