Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
<addr> <city/> </addr>
eval { $details{city} = $elt->first_child('address')->first_child('city')->te +xt; };
dies with "Can’t call method “text” on an undefined value"
shouldn't the eval block have worked and not allowing to die?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: XML::Twig and Eval
by Corion (Patriarch) on Mar 28, 2016 at 09:06 UTC | |
by Anonymous Monk on Mar 28, 2016 at 09:28 UTC | |
by Corion (Patriarch) on Mar 28, 2016 at 09:34 UTC | |
by jellisii2 (Hermit) on Mar 29, 2016 at 14:10 UTC |