$elt->first_child('LINK_CONFIG') returns an element, unless there is no LINK_CONFIG child. So if the code fails it will be at runtime, not compilation.
If this is likely to happen then you have to process this case:
if( my $link_config= $elt->first_child('LINK_CONFIG')) { my $relationship= $link_config->first_child('RELATIONSHIP')->text; + # ... } else { warn "no LINK_CONFIG found\n"; # or any other processing necessary }
In reply to Re^3: XML::Twig and subchildren
by mirod
in thread XML::Twig and subchildren
by jfroebe
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |