[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl-WebCGI] CGI.pm versus the long way...



Hi

>I wondered if anyone could offer me their pros and cons of using the 
>CGI.pm over doing it the long way.

The pros - easier to use, and reinventing the wheel can be annoying. 
I've known quite a few people with very limited knowledge of 
programming and Perl who have managed to get functional CGIs working 
using CGI.pm, and they don't have to try and work out their own 
parsers for form data and stuff.

However, I don't use it. Mostly because I did write my own parsers, 
they are simple and work well, and I can easily cut and paste them 
into any script I am working on in a few seconds. And once they are 
there I have more control - I can strip them of html tags as I parse 
the data, for example, or do almost anything I wish just by changing 
a line of code.  But the real reason is simple - I don't like 
debugging code that uses modules, as they are damn hard to track down 
the problem. You have to open several files and work out what they 
are doing before you even have a chance of figuring out what is 
wrong, and this is much harder for me than just sorting through the 
one script - especially if you write clean code.

Mind you, if I was writing really big projects, or trying to achieve 
special functions (like working with graphics) then I would, and do, 
use modules. It all depends on the situation - but I was never really 
taken with CGI.pm, and if you mostly use only a very limited set of 
its functionality then I find that cut-and-paste is just as easy.

Regards,

Adam.
-- 
---------------------------------------------------
Web Support Officer
Room 2.51, Law and Commerce Building
Faculty of Education, Humanities, Law and Theology
Flinders University
Phone (08) 8201-3628 (before 1:00pm)
Phone (08) 8201-3990 (after 1:00pm)

==== Want to unsubscribe from this list?
==== Send mail with body "unsubscribe" to macperl-webcgi-request@macperl.org