The problem with the code you posted is that my $forms is a completely different variable from $main::form. The former is a lexical variable, the latter a package variable. See perldoc -q lexical.
Can you tell us more about the module you that you want to access CGI data from? Is it an OO class? If so, you could design the class so that it (or its instances) contain a reference to a CGI object (a has-a relationship). If it is not an OO class, you may have to pass the CGI object as an additional argument to the functions in the module, or else have a package-level configuration variable for the module to hold a reference to some CGI object, and provide a method to set this configuration variable from the calling code.
the lowliest monk
In reply to Re: CGI Module
by tlm
in thread CGI Module
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |