develooper Front page | perl.perl5.porters | Postings from October 2003

Re: [PATCH pod/perlfunc.pod] ref can return false on references

Thread Previous | Thread Next
From:
hv
Date:
October 7, 2003 07:25
Subject:
Re: [PATCH pod/perlfunc.pod] ref can return false on references
Message ID:
200310071429.h97ETxv19903@zen.crypt.org
"Nick Ing-Simmons" <nick.ing-simmons@elixent.com> wrote:
:But frankly if anyone wants to bless into "0" that is their problem.

I agree, and I'd go further: if someone wants to bless into "0" you
should assume that they know what they are doing, and that they are
probably doing it specifically (and for some good reason) so that
ref($obj) will be false.

I'd be inclined therefore to add a warning if you try to bless into
"0" (to help those doing so inadvertently), document in diagnostics
that this will affect boolean ref(), and leave the rest alone.

Hugo

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About