Use block if, not postfix if [was: Re: [Catalyst] TT2 + CP::Authentication + DBIC gotcha]

Chisel Wright chisel at herlpacker.co.uk
Fri Jul 13 16:43:01 GMT 2007


On Fri, Jul 13, 2007 at 04:33:59PM +0100, Matt Lawrence wrote:
> What's wrong with that? I find it a lot more readable than
> 
> my $vote;
> if ($bar) {
>    $vote = $foo;
> }

Check chapter 6 in PBP for the reasoning I'd parrot here if I could be
bothered to type it all myself.


-- 
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/

  It's just a motivational meeting. I don't care if I miss it.



More information about the Catalyst mailing list