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

Matt Lawrence matt.lawrence at ymogen.net
Fri Jul 13 16:33:59 GMT 2007


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!
>
What's wrong with that? I find it a lot more readable than

my $vote;
if ($bar) {
    $vote = $foo;
}


Matt





More information about the Catalyst mailing list