Subject: | /usr/bin/xpath outputs unwanted text when quiet mode ist set |
Date: | Sun, 19 Jun 2011 14:28:41 +0200 |
To: | bug-XML-XPath [...] rt.cpan.org |
From: | Michael-O <1983-01-06 [...] gmx.net> |
If I perform a non nodset action it simply outputs:
Query didn't return a nodeset. Value: <value>
Even if I set -q and still prints that line on stderr. This is annoying.
In quiet mode it should spit out the value only.
A small patch fixes the issue:
--- /usr/bin/xpath 2004-10-29 00:51:18.000000000 +0200
+++ /usr/bin/xpath.new 2011-06-19 14:23:07.000000000 +0200
@@ -98,7 +98,7 @@
}
}
else {
- print STDERR "Query didn't return a nodeset. Value: ";
+ print STDERR "Query didn't return a nodeset. Value: "
unless $quiet;
print $nodes->value, "\n";
}
Mike