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:
Gisle Aas
Date:
October 6, 2003 09:54
Subject:
Re: [PATCH pod/perlfunc.pod] ref can return false on references
Message ID:
lrhe2m8g22.fsf@caliper.activestate.com
Graham Barr <gbarr@pobox.com> writes:

> >>    $ perl -wle 'print ref bless [] => 0'
> >>    0
> >
> > I would be tempted to make that bless illegal.
> 
> I dont see why we should treat that specially. People can always bless
> into a package which has overload and have that return false.

I don't think you are able to overload on the class name.  The HvNAME
is just a char*.

Regards,
Gisle

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