Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

alternatives to cgi.pm

by chorg (Monk)
on Apr 22, 2001 at 08:58 UTC ( #74532=perlquestion: print w/replies, xml ) Need Help??

chorg has asked for the wisdom of the Perl Monks concerning the following question:

I want to use CGI.pm

Having said that - I don't want to use CGI.pm's html shortcuts. Why?

I've noticed that when my program generates HTML, I end up maintaining the generated HTML. I don't want to do that. Also, I don't want a ton of overhead importing it if I'm not going to use most of the functions.

Now, I 'm familiar, and happy with CGI.pm's methods etc. My question is :

Is there a lite form of this module, that loads faster, that still uses the same API? Kinda like Apache::Request is for mod_perl
_______________________________________________
"Intelligence is a tool used achieve goals, however goals are not always chosen wisely..."

Replies are listed 'Best First'.
Re: alternatives to cgi.pm
by AgentM (Curate) on Apr 22, 2001 at 09:01 UTC
Re: alternatives to cgi.pm
by geektron (Curate) on Apr 22, 2001 at 12:02 UTC
    you can specify the methods from CGI.pm that you want to import, ie:

    use CGI qw/ form /;

    or
    use CGI qw/ cgi /;
    to only import the form-handling methods, or the cgi-related methods.

    this will allow for using CGI.pm for parsing, and still allow you to generate your own HTML.

Re: alternatives to cgi.pm
by Chady (Priest) on Apr 22, 2001 at 10:46 UTC

    I usually have to work with websites that are designed all graphically, using tables and IMG tags, that are non-validated... and I can't generate the right HTML using CGI.pm, so I run to making my own templates; the designer creates the template HTML, and I stuff it with comments that are then read by the script which substitutes the comments with desired values..

    I know it's bad practice, but it saves me from maintaining the generated HTML to fit the designer's 'design' .


    He who asks will be a fool for five minutes, but he who doesn't ask will remain a fool for life.

    Chady | http://chady.net/
Re: alternatives to cgi.pm
by Beatnik (Parson) on Apr 22, 2001 at 14:29 UTC
    Apparently CGI3.pm has some optimizations...

    Greetz
    Beatnik
    ... Quidquid perl dictum sit, altum viditur.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://74532]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (1)
As of 2023-06-01 05:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?