in reply to Re: Re: Re: A vexing list vs. scalar context question.
in thread A vexing list vs. scalar context question.
I hate 'HASH' eq ref(...) since it doesn't consider blessed hashes to be hashes, and there are sometimes valid reasons for treating blessed hashes as hashes that don't even violate object encapsulation (for example, from inside the object's own methods).
I'd prefer:
my $ref= $self->{x}; return %{$ref} if UNIVERSAL::isa($ref,'HASH');
See also Want.pm.
- tye (but my friends call me "Tye")
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (tye)Re: A vexing list vs. scalar context question.
by japhy (Canon) on Feb 01, 2002 at 02:06 UTC | |
by chipmunk (Parson) on Feb 01, 2002 at 02:42 UTC | |
by theorbtwo (Prior) on Feb 01, 2002 at 04:35 UTC | |
by tye (Sage) on Feb 01, 2002 at 07:13 UTC |