[Catalyst] Users hierarchy
Andrew Rodland
arodland at comcast.net
Sat Jun 7 04:56:53 BST 2008
On Friday 06 June 2008 10:46:53 pm Jonathan Rockway wrote:
> * On Fri, Jun 06 2008, sindharta_tanuwijaya at yahoo.co.jp wrote:
> > Gulp, that should have been 0 :)
>
> Actually, it should have been "!" as in "if(!$found ...)". Perl has a
> variety of "false" values including 0, undef, and the empty string.
> Perl's built-in boolean operators return "undef" or "1" as false or
> true, but other libraries use other values ("" and "hey, it worked!",
> for example).
Actually (0==1) is "" and defined, while we're picking nits. The point stands
that if you want to test for truth you should simply test for truth.
Andrew
More information about the Catalyst
mailing list