in reply to Error "Can't use an undefined value as a HASH reference" while working with generated objects
What I'm looking for is a tip on how I could find out right after I retrieved my object that some of his arrays/hashes are empty..
use defined, and exists, or use Data::Diver 'Dive';
if( my $want = Dive( $foo, qw/ bar anything you want / ) ){ ... }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Error "Can't use an undefined value as a HASH reference" while working with generated objects
by HJO (Acolyte) on Oct 11, 2012 at 09:47 UTC |