in reply to Understanding $CGI::Q

hmm... is there a reason you're not doing (in main) my $q = CGI->new;, and then passing $q to trimParameters?

Replies are listed 'Best First'.
Re: Re: Understanding $CGI::Q
by Anonymous Monk on Jul 15, 2003 at 23:34 UTC

    yeah.

    I've got code written with the oo CGI interface, and code written with the function CGI interface. trimParameters sits between these two different sets of files. That's why trimParameters takes $q (it ususally sits in a .pm file). It takes $q from the oo code, and $CGI::Q from the function oriented code.

    But, clearly, I do not understand how to use the function oriented CGI module, and how $CGI::Q is initialized.

    By my understanding, if I do my $q = CGI->new, I get two objects, a local object referred to by $q, and a global object that is automatically used in function mode, and can be directly accessed by $CGI::Q. If, on the other hand, I do not do $q=CGI->new, I still get the default cgi object, $CGI::Q

      Sorry, The

      by Anonymous Monk on Jul 15, 2003 at 19:34

      post was me ...