Perl Needs Better Tools
by Matisse Enzer
|
I am well aware that the dynamic nature of Perl makes it harder to have a
program that can read and understand a Perl program, especially a large and
complex one, but the difficulty in comprehending a Perl program makes the value
of such a tool all the greater, and I have faith that the Perl community can
overcome some of the built-in challenges of Perl. Indeed, it is among the
greatest strengths of Perl that Perl users can adapt the language to their
needs.
A great Perl IDE will contain at least the following, plus other features I
haven't thought of. (And, of course, there must be many of those!)
- A syntax-coloring text
editor.
- Real-time syntax-checking to catch and
display syntax errors as you type.
- Version control integration to
check out and compare code using CVS, Subversion, etc.
- A code-assist editor, to provide a list of
methods when you type in an object reference, for example.
- Excellent refactoring
support.
- A tree view of source files and
resources.
- Support for creating and running unit
tests.
- Language-specific help.
- Real-time display of debugging results.
- Automatic code reformatting.
- Seamless handling of multiple
languages (such as Perl and C, Perl and Java, Perl and PHP, or Perl and
Python).
- Automated build and test
support.
Most of the screen shot examples in this article use the EPIC Perl IDE. At
present, it has the largest amount of the features on my list (although it
certainly doesn't have all of them).
Syntax-Coloring Text Editor
Most of you have probably seen this. It is available under vim, emacs,
BBEdit, and TextPad. Just about every decent text editor will colorize source
code so that keywords, operators, variables, etc., each have their own
color, making it easier to spot syntax errors such as forgetting to close a
quote pair.
Real-Time Syntax Checking

Figure 1. Real-time syntax checking
The IDE in Figure 1 shows that line 4 has an error because of the missing
) and that line 5 has an error because there is no declaration of
$naame (and use strict is in effect).
A key point here is that the IDE shows these errors right away, before you
save and compile the code. (In this example, the EPIC IDE lets you specify how
often to run the syntax check, from 0.01 to 10.00 seconds of idle time, or only
on demand.)
As nice as this is, it would be even better if the IDE also offered ways to
fix the problem, for example, offering to change $naame to
$name. Figure 2 shows an IDE that does exactly that; unfortunately,
for Java, not Perl.

Figure 2. Syntax help from the IDE
It would be great if Perl IDEs offered this kind of help.
Version Control Integration
All non-insane large projects use version control software. The most common
version control software systems are probably CVS, Perforce, Subversion, and
Visual SourceSafe. Figure 3 shows an IDE comparing the local version of a file
to an older version from the CVS repository.
|

Figure 3. Comparing a local file to an older version in
CVS--click image for full-size screen shot
|
CVS integration is available in many modern code editors, including emacs,
vim, and BBEdit, as well as graphical IDEs such as Eclipse and Komodo Pro.
Subversion integration is available as a plugin for Eclipse; Komodo Pro
supports Perforce and Subversion.
Prev [1] [2] [3] [4] [5] [6] Next