Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

alternative to CGI::param()?

by valavanp (Curate)
on Jun 17, 2006 at 14:42 UTC ( [id://555967]=perlquestion: print w/replies, xml ) Need Help??

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

Instead of using param() is there any alternative for passing parameters in CGI script

2006-06-17 Retitled by g0n, as per Monastery guidelines
Original title: 'CGI'

Replies are listed 'Best First'.
Re: alternative to CGI::param()?
by davidrw (Prior) on Jun 17, 2006 at 14:47 UTC
    why? what's wrong w/using param? you can always parse the query string directly but that kinda defeats the purpose of using CGI ;)

    You can also use some other framework like Mason or any one of the many others, but that's a pretty drastic change (but then again, we don't know why you're asking).
Re: alternative to CGI::param()?
by gellyfish (Monsignor) on Jun 17, 2006 at 14:59 UTC

    Please explain why param() doesn't do what you want, there may be a variety of ways of doing this which may or may not be suitable to your purpose.

    /J\

Re: alternative to CGI::param()?
by jdtoronto (Prior) on Jun 17, 2006 at 17:55 UTC
    The param() method also has a number of hidden benefits - many other modules that are designed to work in the CGI environment implement an interface to the param() method, thus reducing the need for you to code these interfaces.

    Additionally, the param() method will return an array where it makes sense to do so, like a multiple selection or a set of checkboxes.

    As somebody else said, "tell us why" because many of us have been around long enough to realise that using CGI.pm is a very safe, very robust way of handling form data. In twelve years of writing CGI scripts, since I discovered CGI.pm I have never found a reason that I could not use the param() method.

    jdtoronto

Re: alternative to CGI::param()?
by japhy (Canon) on Jun 17, 2006 at 18:11 UTC
    The CGI module is fine, but there are lighter-weight modules out there. CGI::Simple boasts full compliance with CGI.pm.

    Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
    How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
Re: alternative to CGI::param()?
by Tobin Cataldo (Monk) on Jun 17, 2006 at 14:50 UTC
    You can read POST variables from STDIN
    # read POST data from STDIN read STDIN, $temp, $ENV{'CONTENT_LENGTH'};

    Tobin

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2024-04-25 22:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found