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

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

Thread Previous | Thread Next
From:
Graham Barr
Date:
October 6, 2003 13:52
Subject:
Re: [PATCH] Re: [PATCH pod/perlfunc.pod] ref can return false on references
Message ID:
F63FC074-F83E-11D7-B726-0003938857CC@pobox.com
On 6 Oct 2003, at 21:44, Gisle Aas wrote:
> I've noticed that the documentation of bless already says "Make sure
> that CLASSNAME is a true value" and have said that for a long time.  I
> think we could simply enforce that and disallow all of these:
>
>    bless $thing, 0
>    bless $thing, "";
>    bless $thing, undef;

Well the last two cause ref to return "main" which may surprise some 
people

Graham.


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