in reply to accessing CGI object from a subroutine in another package.
Use 'use vars qw($q)' or the 5.6 construct our:my $q=new CGI;
our $q=new CGI;
Then in the module, refer to the variable by its fully-qualified package name:
$main::q
Purists will maintain, however, that you should just pass it around. Pass $q to create_at_job as well as to print_at_job. (_untaint seems to have the same problem.)
|
|---|