[Melbourne-pm] Postfix conditionals and creating lexicals

Alfie John alfiej at opera.com
Thu Jul 12 06:15:26 PDT 2012


On Thu, Jul 12, 2012, at 10:20 PM, Ben Hare wrote:
> Sorry, I didn't mean that your coding was bad practice. What I meant
> was, barring a solution, I think the answer for everyone in general is
> to simply not declare a my variable in that fashion. I think the
> ability to write code like:
> 
> $a = $b if ( $true )
> 
> is really nice, but ultimately it may have to go to get rid of issues
> like the one you raised. In other words, I don't think your code is
> wrong, I think it should cause an exception to be thrown ( but for the
> reasons I explained before ie; Perl probably can't tell the
> difference, this is probably hard to do ).

I think we're all in agreement here. Seeing as no compile time warnings
are raised (unless Perl::Critic is used), and the issue won't be fixed
anytime soon, we all need to keep this in the back of our minds.

See you all in another 5 years when somebody else raises it :)

Alfie

-- 
  Alfie John
  alfiej at opera.com


More information about the Melbourne-pm mailing list