Thursday, February 21, 2008

Configuring Perl IDE using Eclipse + EPIC + Perlcritic

Though not an ardent fan of any IDE (integrated development environment), i just thought of setting up one for PERL. i decided to stick on to the one available Free & Open option ie, Eclipse.This tutorial is a sneek peek into the getting this IDE for Perl up and running in Ubuntu Gutsy Gibbon.

Softwares needed:
Eclipse 3.2

First Install the Eclipse platform preferrably 3.2 or above.Ensure that the JRE or JDK is already present because eclipse is dependant on that.As of now Eclipse would support java only, to set it up for Perl, download the EPIC package from To install the plugin EPIC in Eclipse, in the eclipse window, navigate to Help -> Software Updates -> Find & Install -> Select for new features to install -> New Local site. Now select the downloaded package and the installation would go on fine.

It is assumed that creation of workbench, projects and files in eclipse are known.Now we have come to the interesting part of setting up perlcritic. perlcritic is a static analyzer which analyses the file on compilation and spits out warnings in case it does not fall in line with Perl Best Practices by Damien Conway. This comes in handy to write efficient and discernable code.Perlcritic is dependant on a number of perl modules most of which are not part of gutsy but part of hardy. Before installing perlcritic from look into the dependencies and install those by dpkg -i file.deb once the perlcritic is installed configure the EPIC properties in Eclipse which is a easy one to do.

Now for perlcritic to throw up the warnings, install the perl module criticism from then in the code that you write include the line use criticism 'gentle'; remember to remove the this line before shipping your product :) Now you have a perfect IDE for Perl up and running.

I am still on the search for a perl source code browser something like cscope or opengrok which works for C. If someone knows of any, dont forget to share it with me in a comment!!!

No comments: