CGI Developer's Tools
Although I program in other languages as well, my preferred CGI language is Perl.
This article is for those who develop or modify Perl CGI programs, and for those who are thinking of learning Perl CGI.
Getting Started
To get started developing Perl CGI programs, you can use your plain text word processor and then upload the programs to your server. They are uploaded and errors fixed as sections are ready for testing.
It can be fun, but time-consuming. Every change must be uploaded via FTP and tested with a browser. And, error logs must be downloaded to see any generated error messages. (See below for the URL of a program called "Happy New Year!" that can bypass the FTP requirement and automate error message retrieval.)
Perl On Your Own Computer
Soon after you decide to continue developing Perl CGI programs, you want to get a Perl distribution for your own computer. (A Perl distribution is the set of programs required to run scripts: the compiler and modules.) With your own Perl distribution installed, you can develop and test the non-CGI portions of your program before beginning the upload/test cycles.
Perl distributions for most popular platforms, including Macintosh and the various windows flavors, can be obtained from http://www.perl.com/CPAN/ You'll be able to pick up the source code or binaries (compiled source code) for your operating system.
The Perl I use for developing on Win98 is ActivePerl, obtained from http://www.ActiveState.com/ActivePerl/ For Win9? and NT, you will need InstMsi.exe to installing ActivePerl; InstMsi.exe download links are provided on the ActiveState site.
Mari uses MacPerl, available from http://www.MacPerl.com It's easy to install and intuitive for the user, just like most Macintosh applications.
For developers with Windows computers, an application called Visual Perl Editor can improve development time. It allows you to develop and test the CGI sections of your Perl programs without the need to upload. Visual Perl Editor can be bought at http://www.xarka.com/vpe.html
I used to use Visual Perl Editor. Now, I use ActivePerl and develop with Apache.
Apache On Your Own Computer
Yes, the most widely used HTTP server software, Apache, is available for Windows computers. Just download it and install it on your computer.
You can configure your Apache installation to run CGI from the cgi-bin or from any public documents directory, with or without SSI, and other options. You'll probably want to set it up similar to the server where your domain is being hosted.
Once installed, you can use it off-line just like you would use a regular internet server.
This is a fine development tool. Download links are at http://www.apache.org/httpd
For developers on Macintosh, Apache has been ported to the Mac OS X Server.
A Good Plain Text Word Processor
My favorite plain text word processor is Arachnophilia from http://www.arachnoid.com/arachnophilia/ I use Arachnophilia for almost all site development that requires text files.
Happy New Year!
Whether or not you have a Perl distribution, Visual Perl Editor, and/or the Apache HTTP server on your computer, sooner or later you will need to upload your CGI program to the internet server at your hosting company. Then you'll have to test it. And you'll have to download the error logs to view the messages.
I developed my own little tool to automate the process a bit. It's called Happy New Year! because I'm offering a free copy exclusively for readers of this article published in the last WillMaster Possibilities ezine issue of year 2000. The download link will not be anywhere else on the willmaster.com site.
Happy New Year! lets you upload plain text files (like Perl scripts) to a Unix server without using an FTP program. Instead, you use your browser. It lets you specify permissions for the uploaded file. And it lets you view the last several dozen lines of your error log without having to download the whole file.
It's a nice little time saver, password protected. You upload files and view error log entries in a separate popup. That way, you can test your program in the main browser window.
The download URL is /a/7/pl.pl?art75
Question:
Did you find this article interesting and understandable? How can it be improved?
Your response is anonymous.
When done typing, click anywhere outside the box. [more info]
Will Bontrager
©2000 Bontrager Connection, LLC
Please note:
Articles on this website are presented "as is". However -
If you have a question about a CGI script, HTML, CSS, PHP, or JavaScript
Ask one of our Experts and you'll have your answer!
Click here for details.