in reply to using modules already 'used'

I cannot duplicate your problem:
package X; use CGI; $q = CGI->new; package Y; use CGI; $r = CGI->new; print $X::q->param('a'), " = ", $r->param('a');
friday:~ $ perl cgi (offline mode: enter name=value pairs on standard input) a=123 = 123 = 123

_____________________________________________________
Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Replies are listed 'Best First'.
Re: Re: using modules already 'used'
by cLive ;-) (Prior) on May 10, 2002 at 00:03 UTC
    Funny, I can't find the scripts now where I was having this problem, but here's the rough issue:
    package X; use CGI; $q = CGI->new; $q->param('test','test value'); print "In Package X: ", $q->param('test'), "\n"; package Y; use CGI; $r = CGI->new; print "In Package Y: ", $r->param('test'), "\n";
    Wheras, I want $r to contain the correct value of test. Now do you see what I mean? So I just want one CGI object created over the several namespaces.

    cLive ;-)

    --
    seek(JOB,$$LA,0);

Re: Re: using modules already 'used'
by tachyon (Chancellor) on May 10, 2002 at 13:51 UTC

    I cannot duplicate your problem:

    Different problem. You are effectively using GET data. Try the same trick with POST and $r->param('a') wil be undef as you have stripped all the data off STDIN. See Re: using modules already 'used'

    cheers

    tachyon

    s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print