[Catalyst] Users hierarchy

Jonathan Rockway jon at jrock.us
Sat Jun 7 04:46:53 BST 2008

* 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).

Additionally, 0 is "==" to a variety of true values, including the
string "0 but true".

So just use "!$boolean" to test if something is false :)

Jonathan Rockway

print just => another => perl => hacker => if $,=$"

More information about the Catalyst mailing list