On Thu, Jul 10, 2008 at 12:56 PM, Andy Armstrong <andy@hexten.net> wrote:
> There's a thread[1] on the mod_perl mailing list at the moment which
> suggests[2] that
>
> my $foo = "bar" if $baz;
>
> is causing memory corruption with mod_perl on 5.10.0. On 5.8.8 the same code
> worked fine.
>
> It's understood that it's a bad idea but it doesn't seem great that it can
> screw things so badly. Is this a known problem with 5.10?
From perldelta on 5.10.0:
Deprecated use of my() in false conditional
A new deprecation warning, *Deprecated use of my() in false
conditional*, has been added, to warn against the use of the dubious
and deprecated construct
my $x if 0;
I'd always heard not to initialize my variables in a conditional statement.
-- David
Thread Previous
|
Thread Next