Skip Menu |
 

This queue is for tickets about the XML-XPath CPAN distribution.

Report information
The Basics
Id: 68932
Status: resolved
Priority: 0/
Queue: XML-XPath

People
Owner: MANWAR [...] cpan.org
Requestors: 1983-01-06 [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.33
Fixed in: 1.36



From 1983-01-06 [...] gmx.net Sun Jun 19 08: 28:50 2011
X-Y-GMX-Trusted: 0
MIME-Version: 1.0
X-Spam-Status: No, score=-4.597 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, FREEMAIL_ENVFROM_END_DIGIT=1.553, FREEMAIL_FROM=0.001, FROM_STARTS_WITH_NUMS=0.738, RCVD_IN_DNSWL_HI=-5, SPF_FAIL=0.001, T_TO_NO_BRKTS_FREEMAIL=0.01] autolearn=ham
X-Spam-Flag: NO
X-Provags-ID: V01U2FsdGVkX1+N6iQ3bICNvnMPWPu80XY+U/ZEgijReh5xGpfRZ7 iQN7N8Q6k0Fa0c
X-Authenticated: #2828799
Content-Type: text/plain; charset=UTF-8; format=flowed
Message-ID: <4DFDEB79.3070601 [...] gmx.net>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -4.597
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 24AB024027C for <cpan-bug+XML-XPath [...] hipster.bestpractical.com>; Sun, 19 Jun 2011 08:28:50 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oEgNCSs86896 for <cpan-bug+XML-XPath [...] hipster.bestpractical.com>; Sun, 19 Jun 2011 08:28:48 -0400 (EDT)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 8B1C52401FB for <bug-XML-XPath [...] rt.cpan.org>; Sun, 19 Jun 2011 08:28:48 -0400 (EDT)
Received: (qmail 13423 invoked by uid 103); 19 Jun 2011 12:28:47 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 19 Jun 2011 12:28:47 -0000
Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.23) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with SMTP; Sun, 19 Jun 2011 05:28:45 -0700
Received: (qmail invoked by alias); 19 Jun 2011 12:28:41 -0000
Received: from p54BE9D11.dip.t-dialin.net (EHLO [192.168.1.5]) [84.190.157.17] by mail.gmx.net (mp055) with SMTP; 19 Jun 2011 14:28:41 +0200
Delivered-To: cpan-bug+XML-XPath [...] hipster.bestpractical.com
Subject: /usr/bin/xpath outputs unwanted text when quiet mode ist set
User-Agent: Thunderbird 2.0.0.24 (Windows/20100228)
Return-Path: <1983-01-06 [...] gmx.net>
X-RT-Mail-Extension: xml-xpath
X-Original-To: cpan-bug+XML-XPath [...] hipster.bestpractical.com
X-Spam-Check-BY: 16.mx.develooper.com
Date: Sun, 19 Jun 2011 14:28:41 +0200
X-Spam-Level:
To: bug-XML-XPath [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: Michael-O <1983-01-06 [...] gmx.net>
X-RT-Original-Encoding: utf-8
Content-Length: 659
Download (untitled) / with headers
text/plain 659b
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
MIME-Version: 1.0
In-Reply-To: <4DFDEB79.3070601 [...] gmx.net>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
X-RT-Interface: Web
References: <4DFDEB79.3070601 [...] gmx.net>
Content-Type: multipart/mixed; boundary="----------=_1385124417-8837-2"
Message-ID: <rt-4.0.18-8837-1385124417-1523.68932-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 890
Download (untitled) / with headers
text/plain 890b
I had to add a few lines to make Mike's patch work. It's a trivial change that requires the -q option to come first if at all. On Sun Jun 19 08:28:52 2011, 1983-01-06@gmx.net wrote: Show quoted text
> 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 > >
MIME-Version: 1.0
Subject: xpath.patch
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Type: application/octet-stream; name="xpath.patch"
Content-Disposition: inline; filename="xpath.patch"
Content-Transfer-Encoding: base64
Content-Length: 634
Download xpath.patch
text/x-diff 634b
--- xpath 2013-11-22 13:37:31.000000000 +0100 +++ xpath.new 2013-11-22 13:37:21.000000000 +0100 @@ -20,12 +20,18 @@ my $xpath; my $pipeline; +my $quiet; +if ($ARGV[0] eq '-q') { + # quiet mode + $quiet = 1; + shift @ARGV; +} if ($ARGV[0] eq '-p') { # pipeline mode $pipeline = 1; shift @ARGV; } if (@ARGV >= 2) { $xpath = XML::XPath->new(filename => shift(@ARGV)); } @@ -37,7 +43,8 @@ unless ($nodes->isa('XML::XPath::NodeSet')) { NOTNODES: - print STDERR "Query didn't return a nodeset. Value: "; + print STDERR "Query didn't return a nodeset. Value: " + unless $quiet; print $nodes->value, "\n"; exit; }
MIME-Version: 1.0
In-Reply-To: <rt-4.0.18-8837-1385124417-1523.68932-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <4DFDEB79.3070601 [...] gmx.net> <rt-4.0.18-8837-1385124417-1523.68932-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-8833-1385124551-67.68932-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 994
Download (untitled) / with headers
text/plain 994b
On Fri Nov 22 07:46:57 2013, BWAGNER wrote: Show quoted text
> I had to add a few lines to make Mike's patch work. > It's a trivial change that requires the -q option to come first if at all. > > On Sun Jun 19 08:28:52 2011, 1983-01-06@gmx.net wrote:
> > 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 > > > >
> >
MIME-Version: 1.0
In-Reply-To: <4DFDEB79.3070601 [...] gmx.net>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <4DFDEB79.3070601 [...] gmx.net>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-4165-1457152382-1151.68932-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 133
Download (untitled) / with headers
text/plain 133b
Hi, Thanks for reporting the issue and patch. Much appreciated. I will try my best to patch it asap. Best Regards, Mohammad S Anwar
MIME-Version: 1.0
In-Reply-To: <4DFDEB79.3070601 [...] gmx.net>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <4DFDEB79.3070601 [...] gmx.net>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-28793-1460650232-522.68932-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 9
Resolved.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.