Don't ask to ask, just ask | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I presume you only seting $q when it's a POST request to make sure that users only login with POST, but i think you'll still want to have a my $q = CGI->new() since you may want to, say, set $q->cookie or do a $q->header 'location: http://elsewhere.com/' etc regardless of wether the user has posted the form... CGI::param 'foo' will give you back foo from get/post-age, and will play nice and give you an undef if the form wasn't posted or that field wasn't supplied. If you're not unconditionally putting something in $q then you can't trust $q to be defined and so you should check that there's something there, every time you want to call something on it. It's only safe to do $q->somestuff() if ref $q ie you can only use methods on $q if it is an object (ie if it's a blessed reference) HTH
@_=qw; ask f00li5h to appear and remain for a moment of pretend better than a lifetime;;s;;@_[map hex,split'',B204316D8C2A4516DE];;y/05/os/&print;
In reply to Re^3: Sessions problems
by f00li5h
|
|