On Jul 13, 2007, at 8:02 AM, Perrin Harkins wrote:
On 7/13/07, apv <[EMAIL PROTECTED]> 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!
-Ashley


_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to