On Thu, May 18, 2006 at 02:49:54PM -0400, Perrin Harkins wrote:
> On Thu, 2006-05-18 at 14:38 -0400, Phil Lobbes wrote:
> > mod_perl-1.99_12-2
>
> Ouch! Known bugs! Upgrade as soon as you can.
>
> > my $sub_rec = $app->get_subscriber_rec($custid) if($custid);
> > my $uid_int = $sub_rec->{'uid_int'} if($sub_rec);
>
> This is the problem. Never do an assignment with a postfix "if"
> statement. Changing these ifs to the normal style will fix the bug.
> It's a long-standing Perl bug, which I avoid by simply not using postfix
> if.
To be precise, don't use a statement modifier on a C<my> declaration. If
the conditional is false, the declared variable will not be reset, but will
instead keep its value from the previous iteration.
Ronald