in reply to Re: "if" in a my declaration statement causes problem
in thread "if" in a my declaration statement causes problem

It should, yes. But don't expect it to in any 5.8.x release. The maint pumpking is very cautious about adding new warnings, and for a while there were a number of people advocating
sub foo { my $x if 0; ... }
to create a "static" variable, rather than using a closure
{ my $x; sub foo { ... } }