getting all params while referencing bugzilla's CGI.pl

Edward Tsai tsai_edward at yahoo.com
Tue Aug 19 18:30:54 UTC 2003


Hi Dave,

I came up with this solution - seems to work 

my $params = \%::FORM;

foreach my $key (sort keys %{$params}){
print "'$key' => '$params->{$key}'\n'";
}
to get all the params

-Edward
--- David Miller <justdave at syndicomm.com> wrote:
> On 8/19/2003 11:04 AM -0700, Edward Tsai wrote:
> 
> > hi,
> >
> > normally, i would do a
> >
> > #!/usr/bin/perl
> > use strict;
> > use CGI;
> >
> > my $q = new CGI;
> > print "Content-Type: text/plain\n\n";
> 
>  ....
> 
> > However, if I am using a page that references'
> > bugzilla's CGI.pl, I've tried doing
> >
> > my @params = param;
> >
> > but it doesn't work :(
> 
> 
> If you're using Bugzilla 2.16.x or older, the CGI
> module isn't even
> involved, and the form variables can be referenced
> with $::FORM{fieldname}.
> 
> Somewhere in the 2.17.x timeframe (not sure exactly
> which version) Bugzilla
> started using the real CGI module, but it maintains
> the reference to the
> CGI object for you so you don't have to invoke CGI
> yourself.  You can get
> the CGI object's reference with |my $cgi =
> Bugzilla->cgi;| and from that
> point on, you can use $cgi (or $q as in your
> example) just like you're used
> to.
> -- 
> Dave Miller      Project Leader, Bugzilla Bug
> Tracking System
> http://www.justdave.net/            
> http://www.bugzilla.org/
> -
> To view or change your list settings, click here:
>
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=tsai_edward@yahoo.com>


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the developers mailing list