On Friday 06 June 2008 10:46:53 pm Jonathan Rockway wrote:
> * On Fri, Jun 06 2008, [EMAIL PROTECTED] 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
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/