Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^7: Is this DBM::Deep behavior, or something with tie/bless? (ref)

by tye (Cardinal)
on Feb 12, 2008 at 16:50 UTC ( #667612=note: print w/ replies, xml ) Need Help??


in reply to Re^6: Is this DBM::Deep behavior, or something with tie/bless? (ref)
in thread Is this DBM::Deep behavior, or something with tie/bless?

Yes, I have an open bug against Data::Diver for issuing warnings about pseudo-hashes due to this.

You are right about the other warnings as well. Unfortunately, your alternative has other problems:

my $foo; if( eval { \@$foo } ) { print $foo, $/; } __END__ ARRAY(0x34d10)

In the case of CODE ref testing, there is a different problem:

my $foo= "not_a_code_reference"; print "oops!\n" if eval { \&$foo };

Of course, in some situations, one could consider the latter a feature. But mostly I think it would be unwanted.

It is very sad that Perl still doesn't provide decent tools for determine the data type(s) of a reference. It is no wonder nobody gets this right.

- tye        


Comment on Re^7: Is this DBM::Deep behavior, or something with tie/bless? (ref)
Select or Download Code
Re^8: Is this DBM::Deep behavior, or something with tie/bless? (ref)
by ysth (Canon) on Feb 12, 2008 at 16:59 UTC

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://667612]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (15)
As of 2015-07-06 17:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls