I am using XML::Twig and setting twig_handlers to parse the actual document. The problem I am encountering is that the parser mysteriously dies parsing some relatively simple documents. Below are the handlers being called.
my $handlers = { 'request' => sub { $self->_handler_set_object('request', @_ ) +; # got to here with a warn statement }, $response => sub { $self->_handler_set_object('response', @_ ) +; $self->_object_tree( $response, @_ ) +; # Got to Here, with a warn statement }, }; eval { $self->twig( XML::Twig->new( twig_handlers => $handlers )) +}; croak 'ERROR: ' . $EVAL_ERROR if $EVAL_ERROR; # Got Here eval { $self->twig->parse( $self->get_xml ) }; # Cannot get to here croak 'ERROR: ' . $EVAL_ERROR . qq{\nXML: } . $self->get_xml if $E +VAL_ERROR;
I think the XML parsing engine is blowing up because I never get to the croak error message when it dies. I could upgrade the XML libraries and hope that fixes the problem but I am not familiar with what libraries I would have to update. I like Twig because the code was fairly easy to write, and would rather not have to use something more complex if I can avoid it.
Anyone got any ideas.
In reply to XML::Twig Unexplained Handler dies by Herkum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |