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
October 7, 2003 13:27
Re: [PATCH pod/perlfunc.pod] ref can return false on references
Message ID:
On Tue, Oct 07, 2003 at 03:29:59PM +0100, wrote:
> "Nick Ing-Simmons" <> 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 really do not like the idea that we're all but blessing a way to circumvent
ref().  Its a totally unnecessary complication.  There's no use case.  I've 
never thought to myself "gee, it would be great if this reference didn't look 
like a reference".  

Furterhmore if, for some mad reason, I did want that there's always 

    *CORE::GLOBAL::ref = sub { 
	my $ref = CORE::ref($_[0]); 
	return $ref eq 'Sekret::Class' ? "" : $ref 

We already have enough ways to do this particular trick.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About