home / experts / perl / tutorial / 5 |
|
|
PerlHoo, Part IIIMagic and GreaseToo bad managing a system isn't as magical as solving a complex problem with an elegant solution. Well, writing the management tools aren't too glittery either. In fact, they're usually down-right tedious. Fortunately, I'd already finished Half-Life a couple months ago and am still waiting for Quake III, so I had a bit more time to write phadmin.pl than I did for perlhoo.pl. With any management software you write, you first have to figure out what you've got to work with. Since PerlHoo uses file system directories to represent categories and the data is stored in files, I knew the magic would be recursion, but I'd forgotten how much grease would be required to deal with the CSV files that contain the entries. Directory File FormatFirst, let's look at one of the CSV files: There are five columns in the PerlHoo files:
Text::CSV_XS module to manipulate the
CSV data files. If you recall, the original reasoning for using CSV files was to allow
a non-technical person to maintain the directory using a text editor, word processor,
or spreadsheet.
Submission ProcessIn Part II, we added the ability for users to submit
new sites to the directory. Rather than being written to the production file, the new
entries were written to the |
home / experts / perl / tutorial / 5 |
|
Produced by Jonathan
Eisenzopf and
Created: July 1, 1999
Revised: July 2, 1999
URL: http://www.webreference.com/perl/tutorial/5/