Subject: | Bad argument checking in is_xpath() |
Minimal test case:
is_xpath('<foo>0</foo>', '/foo', 0)
This results in the following error message:
usage: is_xpath(xml,xpath,expected[,name]) at -e line 1
Changing the condition in is_xpath to this fixes it:
sub is_xpath {
my ($input, $statement, $expected, $test_name) = @_;
croak "usage: is_xpath(xml,xpath,expected[,name])"
unless @_ >= 3;
Cheers,
Ovid