NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
Legacy (Score:1)
I think it used to return undef on older Perls, which is where that meme came from.
Re: (Score:1)
Returns a TRUE value if EXPR is a reference, FALSE otherwise.
which could mean it returns "" or undef or alternates between them.
Re: (Score:1)
Do we know if it actually returned 'undef' or if it always returned q{} as it's FALSE (but defined) value?
Bill
# I had a sig when sigs were cool
use Sig;
Re: (Score:1)
if (ref $thingywork in all cases?Re:Legacy (Score:1)
Under the false assumption that if the argument is not a reference
to check ifrefreturnsundef, a test like this$thingyis a reference or not, would clearly be wrong, non just redundant (you can find an example of this here [google.com]).Anyway my main complaint was about the fact that, even if the code is formally correct (whereas the test is used to supposedly avoid the possible warning from a subsequent test), such
defined-ness test is redundant, or unnecessary, or superfluous (pick your favorite), sincerefnever returnsundef.In other words I mean that there is no reason to say
sincegives no warnings as well (at least today), and it is less cluttered and more readable (and a little bit faster tooCiao, Emanuele.
Reply to This
Parent
Re: (Score:1)
Please forget my previous pointless post: I wrongly assumed that DAxelrod was talking about
while he clearly saidCiao, Emanuele.