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:
schwern
Date:
October 6, 2003 14:19
Subject:
Re: [PATCH] Re: [PATCH pod/perlfunc.pod] ref can return false on references
Message ID:
20031006141701.B22158@ttul.org
On Mon, Oct 06, 2003 at 09:52:13PM +0100, Graham Barr wrote:
> 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

Fortunately, there's a warning.


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