Subject: | XML::XPath::Parser |
When sub PrimaryExpr detects a bad token, it dies with a "\n", leaving
the programmer of the bad expression wondering what died, where, and
why. The only recourse, for such a programmer, (like myself), is to put...
warn "here";
... statements above and below each line of code to try to find the
offending one.
Typically, you'd want to use Carp::croak() to return the error to the
programmer, and if it's inconvenient to do so (or to re-write it to be
meaningful for the programmer), then you should at least leave the "\n"
off so the programmer can source dive the XPath::Parser.pm module to
find out what's generating the error...
This line immediately triggerd 20 minutes of debugging for me:
die "Not a PrimaryExpr at ", $tokens->[$self->{_tokpos}], "\n";
Grrrs.
But please don't take this rant to mean that I dislike XML::XPath. It's
still one of my favorite modules!