Perl Builder, by Solutionsoft, is the first integrated development environment (IDE) for Perl. It allows you to develop and test Perl applications in a Windows 95/98/NT environment.
I tested Perl Builder on a machine with a Cyrix 6x86/200MHz processor and 48Mb RAM using Windows 95 and then the same machine using Windows 98. Both of these test machines used the ActiveState Perl port. I also tested Perl Builder on a Pentium 166 with 96Mb RAM running Windows NT. This machine used the latest Gurusamy Sarathy port of Perl.
Installing Perl Builder took about 5 minutes. It was very simple and I had no installation problems. I was surprised by the nice, clean interface and yet the program was only around 750kb in size before installation! To me, this is remarkable in an age where IDE's can easily take over 100Mb of space. Granted, Perl Builder is really just a text editor that integrates with Perl so there are no libraries or any Perl-related files included with the program.
To use Perl Builder, you need to have Perl installed on your system. You can use either the ActiveState Perl port or the "Gurusamy Sarathy" port of Perl. Neither of which come with Perl Builder, but Solutionsoft does provide links so that you can easily download them. I recommend the "Gurusamy Sarathy" version.
Once installed, my first task was to run through the tutorial provided. The tutorial walks you through creating a "mailto" form using an HTML form that they provide. It worked as advertised and was an easy-to-follow tutorial that provides you with a good overview of the IDE.
Perl Builder is basically a text editor that has been written specifically for writing Perl scripts. Perl Builder provides a simple programming environment that is easy to get comfortable with. The different windows in the IDE are "tabbed" for easy access. The normal tabs are Main Script, Input Values, and Output: HTML/Text. Other tabs, like errors, are added as needed.
Figure 1: Perl Builder's visual editor
The Main Script tab is the area where you actually write the script. The code that you write is automatically color-coded by Perl Builder and the colors are user-customizeable Having color-coded Perl code makes viewing the code much easier. I found that once you get accustomed to the colors, you can quickly scan the code for what you are looking for.
The Input Valuestab allows you to specify either the values that you would have sent from an HTML form if you are writing a CGI script. Or, from STDIN if you are writing a non-CGI script.
The Output tab shows you what output your Perl application produced. If you are writing a CGI script, there is a button on this tab that allows you to view the code in a web browser. Perl Builder actually takes the output from your script, and produces a local HTML file for the browser view.
The Errors tab does exactly what you would expect it to do, it shows you any errors that were generated by your script. The feature I liked here is that you can double-click on the error, and you are taken right to that line of code on the Main Script tab.
When a CGI script generates one or more e-mail messages, Perl Builder also provides a tab that shows you what the e-mail(s) would look like.
Perl Builder includes some great features for debugging your code. You can set breakpoints, watches, step through your code or do just about anything that an IDE debugger should do. You can also run with "strict" or evaluate your code with the -w flag.
Perl Builder has many nice features. My favorites were:
The Editor-scripts menu item, my favorite tool, allows you to write Perl scripts that will be performed on your code. Solutionsoft includes a few like block-comment and block-uncomment. I wrote a quick one that allows me to add line-numbers to my code and replace all of the < and >'s in my code with their HTML equivalents. This saves me a great deal of time when I write code for articles. Now I just highlight the code, and let Perl Builder do everything for me.
To use the editor scripts, all you do is highlight the code you want to perform the action on, and choose the appropriate item from the menu. The code is executed only on the part of your script that you highlighted. Plus, you don't have to learn any new "scripting languages", it is all customized with Perl code.
- Regular Expression Search/Replace
This feature allows you to use the power of Perl and create complex search/replace regular expressions that are executed on your script.
- CGI Wizard
The CGI Wizard in Perl Builder allows even non-programmers to write CGI scripts that can accept HTML form data, validate the entries, e-mail multiple messages to multiple recipients and generate response pages on-the-fly. The CGI Wizard steps you through the process and does 99% of the work for you. All you have to do is choose an HTML form, the wizard imports the variables and then steps you through the rest of the process.
Perl Builder is a great product, but there were a few items that I'd like to see addressed.
- The menu bar at the top of the IDE did not have a print button. I like to print my code out and draw all over it, while this is just a minor detail, I'd like to see it added.
- When generating forms on-the-fly, Perl Builder only allows you to create and test the first form. You cannot test scripts on code that was dynamically generated. The ability to test the dynamically generated forms would add to the complexity of the program, but it is needed to fully test CGI scripts. I write many scripts that dynamically generate HTML forms and call themselves with these new forms.
- When using the watch portion of the debugger, I found that when I closed the watch window I began getting errors from Perl even though none of the code had changed. I found that if I closed Perl Builder and restarted it, all was well again.
- I also ran into a few graphic glitches while using the program. The graphic problems were much better than in the beta that I had tested previously but they were still annoying. I am confident that as this program evolves, this is still version 1.0 of the program, these glitches will be worked out.
Wrapping It Up
Overall, Perl Builder is a great program and is something that should have been developed a long time ago. It is a great tool for both beginning Perl programmers, and experienced Perl programmers. Perl Builder's clean interface and powerful features take much of the unnecessary work out of Perl programming.
While it is not perfect, and can't handle some of the more complex Perl programs, it is a great environment for developing most of your CGI scripts. The ability to easily test your scripts locally is something that makes CGI programming much easier.
The price for Perl Builder is $149. Although I think that the price is reasonable, I think it would do better if the price was around the $99 range. Perl developers have become accustomed to free software and I think that they may have a hard time spending almost $150 for a "helper" program.
Overall, I give Perl Builder a 4.5 out of 5 camel rating.
Author's note: I was contacted by Solutionsoft and told that a version 1.0a would be released sometime this week. Version 1.0a is supposed to fix many of the bugs that we found in version 1.0. An update to this article will be added when I have had a chance to evaluate the new version.