good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re^6: Perl Style: ... (TRUE, FALSE and FAILED)by ait (Hermit) |
on Aug 25, 2010 at 00:32 UTC ( [id://857048]=note: print w/replies, xml ) | Need Help?? |
If you wonder about my definition of FALSE, see Truth and Falsehood in perlsyn:
From the pod you are reffering to:
I still believe it's more customary to use undef as the ultimate null and false value in Perl. For example in DBI, DBIx::Class and alike, if you set a field to undef it will store in the database as an actual NULL whereas if you use '' (the empty string) you will get a blank string in the database, probably not what you'd want. I have a feeling that the explicit returning of undef is a quite popular convention :) This "ultimate null/false discussion" is probably steering OT and should move to a new thread IMO, though I would suspect that it has been discussed ad nauseam here in PM.
In Section
Seekers of Perl Wisdom
|
|