G
gmills
Hello -
I am creating a module that does some work for various CGI in my
system. I would like to pass the CGI object to subroutines in my
module, but I can't figure out how to do it. Right now, I'm taking a
reference to the variable that holds the object in my CGI, like this:
use CGI;
use MYMODULE;
$q = new CGI;
MYMODULE::subroutine(\$q);
But if, for example, in MYMODULE, I do this:
use CGI;
sub subroutine {
$qref = shift;
$q = $$qref;
foreach $name ($q->params) {
I get the message that CGI:arams is an undefined subroutine, when it
should be the names of the parameters passed to the CGI script.
Can anyone tell me what I am doing wrong?
Thanks;
Garey Mills
I am creating a module that does some work for various CGI in my
system. I would like to pass the CGI object to subroutines in my
module, but I can't figure out how to do it. Right now, I'm taking a
reference to the variable that holds the object in my CGI, like this:
use CGI;
use MYMODULE;
$q = new CGI;
MYMODULE::subroutine(\$q);
But if, for example, in MYMODULE, I do this:
use CGI;
sub subroutine {
$qref = shift;
$q = $$qref;
foreach $name ($q->params) {
I get the message that CGI:arams is an undefined subroutine, when it
should be the names of the parameters passed to the CGI script.
Can anyone tell me what I am doing wrong?
Thanks;
Garey Mills