Hello and greetings,
I've been working in the kitchen and listening silently for some time now, but with the permission of the wise ones, I would like to break my vow of silence...

I am inexperienced with Perl, but circumstances have lead me to it and I dig it. Coming from a web design background, the desire and need to create web applications has me squirrming in my chair. I've read and studied "learning Perl", "CGI Programming 101", and am looking at CGI Programming with Perl-2nd ed.". All of these books take me to the CGI.pm as a well used tool by many experienced coders.

What of the talk of "too big", "too slow", and why does Mr. Stien include at the end of the file the text,

"This module has grown large and monolithic. Furthermore it's doing many things, such as handling URLs, parsing CGI input, writing HTML, etc., that are also done in the LWP modules. It should be discarded in favor of the CGI::* modules, but somehow I continue to work on it."
What exactly does this mean?
Is it worth spending time learning about it?
Should one bag the CGI.pm for another, smaller faster module?

If so, what would that be. CGI-LIB seems to get pounded in the newsgroups.

I really want to get very good at this but I need to spend my time efficiently.

Your help would be greatly appreciated.
I'll get back to my potato pealing...

Donzo

PS: I thought I would also add: my company has to deploy it's software on Linux, Solaris and NT(2000) boxes. So Perl/CGI has been the choice, also why I looked into Php. Does mod_perl run on NT(2000)? I guess I am asking about CGI.pm both for my current situation and for future use, dictated mostly by Perl wisdom. Thanks


07/13/01 To all responders:

Thank you!

Replies are listed 'Best First'.
(jeffa) Re: CGI.pm: what of it?
by jeffa (Bishop) on Jul 13, 2001 at 02:59 UTC
    CGI is great for small projects, but yes, it is slow and bulky. If you run Apache, i recommend taking the time to climb the learning curve of mod_perl. Once you get it up and running, you will have all of the benifits that CGI offers, AND have lightening fast page generation time, thanks to caching.

    Lincoln Stein co-authored the book on mod_perl, Writing Apache Module with Perl and C with the author of mod_perl, Doug MacEachern.

    Another option would be CGI::Lite, but i have no experience with it (i use mod_perl!)

    Jeff

    R-R-R--R-R-R--R-R-R--R-R-R--R-R-R--
    L-L--L-L--L-L--L-L--L-L--L-L--L-L--
    
Re: CGI.pm: what of it?
by chromatic (Archbishop) on Jul 13, 2001 at 05:14 UTC
    The speed issue is not as bad as it sounds. CGI uses several tricky methods to defer compilation until absolutely necessary. In addition, if you use the object-oriented interface, you can save the time required to import several dozen symbols.

    If you use only what you need and code reasonably good code, you can probably handle a hundred thousand hits per day. Depending on what you do, CGI::Lite may be a better approach.

    The bottleneck may instead be the cost of spawning new processes, in which case a properly set up mod_perl will indeed give bigger benefits. It's still a little experimental on NT, though.

Re: CGI.pm: what of it?
by $code or die (Deacon) on Jul 13, 2001 at 04:23 UTC
    CGI Version 3 is in alpha state it's meant to be more modular and and be significantly faster. Although there are some bugs at present. It might be worth taking a look at that. However, since it's still alpha release, I don't recommend using it in a production environment.

    Yes, you can use mod_perl on NT\2000 - check out the Apache mod_perl site and go to downloads.

    Error: Keyboard not attached. Press F1 to continue.
Re: CGI.pm: what of it?
by (:smiley:) (Initiate) on Jul 13, 2001 at 14:57 UTC
    In my limited perl experiance, the slowdown for most things is negligable. It's a small price to pay for the ease of web programming and saftey that it provides. You could always not use it and write scripts like the ones on matt's script archive!