PerlHoo, Part III | WebReference

PerlHoo, Part III

PerlHoo, Part III

Abstract

In Part I of the PerlHoo series, we built a functioning Yahoo-like Web directory in less than 100 lines of code by using file system directories to represent the Web directory hierarchy and comma delimited files (CSVs for short) to store the data.

In Part II, we added the ability for users to suggest new URLs for a category.

In Part III, we will add the capstone to PerlHoo by adding an administrative tool that will allow us to add, edit, and delete new and current entries in the Web directory.

To accomplish this feat, I decided to create a separate script, phadmin.pl, which will operate in conjunction with perlhoo.pl. I had originally hoped to keep it under 100 lines of code, but I started tinkering until it was over 200 lines. I would normally not do this for Mother of Perl, but I decided the features I added were necessary. I hope you'll agree.

I also started feeling the pain of dealing with flat files instead of a relational database, which we'll talk about later. Also, you may notice some overlap or duplicate functions between perlhoo.pl and phadmin.pl. Before you send me a nastygram, I did consider putting the common functions in a library, then decided against it for two reasons. First, it adds complexity. Secondly, I didn't want to spend the time to do it. There's my laziness and hubris for the day.

Anyway, I hope you've enjoyed this series as much as I have. After this article, I will be moving PerlHoo development to a dedicated site and will announce updates on PerlHoo. If you have any suggestions for modifications, please send them to eisen@internet.com. So let's get on with it already!

phadmin.pl View source | Try it
This scripts allows one to maintain a PerlHoo directory from the Web.

http://www.internet.com

Produced by Jonathan Eisenzopf and
Created: July 1, 1999
Revised: July 2, 1999

URL: http://www.webreference.com/perl/tutorial/5/