[Catalyst] TT2 + CP::Authentication + DBIC gotcha

apv apv at sedition.com
Fri Jul 13 22:31:05 GMT 2007

On Jul 13, 2007, at 8:02 AM, Perrin Harkins wrote:
> On 7/13/07, apv <apv at sedition.com> wrote:
>> [% vote = Catalyst.user.votes({word => w.id}) IF  
>> Catalyst.user_exists %]
> Just FYI, you should never do this type of construct in perl.  It will
> break in bizarre ways.  I doubt that's the issue with TT, but don't
> get in the habit.
> my $vote = $foo if ($bar);  # <--- bad!
> - Perrin
The funny part is that I remember learning this could be a problem
back in the… 5.4 days? But ever since "my" assignments started
becoming legal inside the tops of conditional blocks and "open"
statements and such I just silently assumed it wasn't dangerous
to mess with the assignment line anymore.

Thanks for the reminder!

More information about the Catalyst mailing list