develooper Front page | perl.perlfaq.workers | Postings from January 2005

Re: perlfaq9: How do I decode a CGI form?

From:
Smylers
Date:
January 3, 2005 17:18
Subject:
Re: perlfaq9: How do I decode a CGI form?
Message ID:
slrnctjk4o.e1p.Smylers@stripey.com
_brian_d_foy writes:

> + I'm completely replacing this answer.  The previous version was
> pretty aggressive and ranted about cargo-culting.  It also digressed
> into a discussion of HTTP methods.

Looks good to me -- that's a big improvment.

> + The new answer showcases CGI.pm, and gives a couple examples.
> I'd like people to use it because it's easier, not because we
> decreed it's use.

That's fine with me, and I'm the current maintainer of CGI::Lite.

My only quibble is with this line:

> +       use CGI qw(:all);

That's importing many functions into the main namespace, which could be
a source of unexpected errors for a programmer who isn't familiar with
all of them.  Given that you only use one function in this example
wouldn't it be better simply to do:

  use CGI qw(param);

Smylers




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About