Robin Szemeti wrote:
>OK girls ..
>...
>[submit form with parameter init_login='Login'
>
>my($q)=CGI->new;
>...
>if ( defined($q->param('init_login')) ){
> #do someting and it happens
>}
>... some code goes by
>if ( defined($q->param('init_login')) ){
> #do someting and it DOESNT happen
>}
>
>now .. you are all about to say .. ahh .. something is reseting the
>parameter elsewhere ... either Delete('init_login') or some such BUT if I
>swap the first test to be
First question - is the second if statement in a separate block?
Second question - is your server using mod_perl?
If the answer to both those questions is yes, then mod_perl is doing something nasty
with closures and your blocks/subs.
Try passing $q around as a parameter - that usually solves the problem.
Alternatively, if you don't mind using the standard interface, then use that.
Rob Thompson