in reply to CGI object already instantiated?

You're doing way too much work. The CGI::new method will only read the POST data by default. If you specify another source of data, it won't read the POST data at all.

Try this:

my $cgi = CGI->new({});

This tells CGI to make a new query object using the data from the anonymous hash you passed. Since there isn't any data, you get a new, empty query.

See the documentation for the CGI::new method for more complete information.

Replies are listed 'Best First'.
(Ovid) RE: RE: CGI object already instantiated?
by Ovid (Cardinal) on Nov 13, 2000 at 01:20 UTC
    It's also amazing how I could use the wrong browser and fail to log in.

    The new "Mark Dominus Approved" ;) method:

    sub new { my $class = $_[0]; my $cgi = CGI->new({}); my $objref = { _active => 1, _border => 1, _continue => 0, _cgi => $cgi, _pretty_not_installed => 0 }; bless $objref, $class; return $objref; }
    Much simpler, much easier, no headaches. Thanks!

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just go the the link and check out our stats.

(Ovid) RE: RE: CGI object already instantiated?
by Anonymous Monk on Nov 13, 2000 at 01:15 UTC
    Gah! It's amazing how simple that was. Thanks!

    Cheers, Ovid