Skip Menu |

This queue is for tickets about the HTML-Tree CPAN distribution.

Report information
The Basics
Id: 81371
Status: resolved
Priority: 0/
Queue: HTML-Tree

People
Owner: Nobody in particular
Requestors: ppisar [...] redhat.com
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 5.03
Fixed in: 5.900-TRIAL



Subject: t/construct_tree.t skips some some test on missing LWP::UserAgent with message `URI::file or LWP::UserAgent not installed'
If LWP::UserAgent is missing from system and URI::file is installed, t/construct_tree.t skips some tests with confusing message: ok 30 - found Gisle ok 31 # skip URI::file or LWP::UserAgent not installed ok 32 # skip URI::file or LWP::UserAgent not installed ok 33 # skip URI::file or LWP::UserAgent not installed ok 34 # skip URI::file or LWP::UserAgent not installed ok 35 # skip URI::file or LWP::UserAgent not installed ok 36 # skip URI::file or LWP::UserAgent not installed ok 37 # skip URI::file or LWP::UserAgent not installed ok 38 # skip URI::file or LWP::UserAgent not installed ok 39 # skip URI::file or LWP::UserAgent not installed ok 40 # skip URI::file or LWP::UserAgent not installed ok 41 # skip URI::file or LWP::UserAgent not installed ok 42 # skip URI::file or LWP::UserAgent not installed ok 43 # skip URI::file or LWP::UserAgent not installed ok 44 # skip URI::file or LWP::UserAgent not installed ok 45 # skip URI::file or LWP::UserAgent not installed ok 46 # skip URI::file or LWP::UserAgent not installed ok 47 - new_from_content Scalar REF isa HTML::TreeBuilder This is because the code does something different: SKIP: { eval { # RECOMMEND PREREQ: URI::file require URI::file; require LWP::UserAgent; 1; } or skip("URI::file or LWP::UserAgent not installed", 2 + 2 * tests_per_object); The logical or is not implemented properly.
Subject: Re: [rt.cpan.org #81371] AutoReply: t/construct_tree.t skips some some test on missing LWP::UserAgent with message `URI::file or LWP::UserAgent not installed'
Date: Fri, 23 Nov 2012 12:48:15 +0100
To: Bugs in HTML-Tree via RT <bug-HTML-Tree [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
On Fri, Nov 23, 2012 at 05:48:43AM -0500, Bugs in HTML-Tree via RT wrote: Show quoted text
> This is because the code does something different: > > SKIP: { > eval { > # RECOMMEND PREREQ: URI::file > require URI::file; > require LWP::UserAgent; > 1; > } or skip("URI::file or LWP::UserAgent not installed", > 2 + 2 * tests_per_object); > > The logical or is not implemented properly.
Based on experiment, the LWP::UserAgent is needed uncoditionally, otherwise the library dies in blib/lib/HTML/TreeBuilder.pm line 126. I think the skip message should be rephrased to "URI::file and LWP::UserAgent not installed". -- Petr
Download (untitled)
application/pgp-signature 230b

Message body not shown because it is not plain text.

The code is correct. Both URI::file and LWP::UserAgent are required for the tests covered by that SKIP block. The message is attempting to say that tests are being skipped because "URI::file or LWP::UserAgent not installed". Or in pseudocode, skip if (URI::file not installed) or (LWP::UserAgent not installed); That is, if the condition in the message is true, the tests get skipped. I don't like your suggestion of "URI::file and LWP::UserAgent not installed" because it could be confusing to people who have one of them installed and don't understand why it's saying that neither of them is installed. How about "both URI::file and LWP::UserAgent needed for these tests"?
Subject: Re: [rt.cpan.org #81371] t/construct_tree.t skips some some test on missing LWP::UserAgent with message `URI::file or LWP::UserAgent not installed'
Date: Mon, 26 Nov 2012 08:40:30 +0100
To: "Christopher J. Madsen via RT" <bug-HTML-Tree [...] rt.cpan.org>
From: Petr Pisar <ppisar [...] redhat.com>
On Fri, Nov 23, 2012 at 12:50:58PM -0500, Christopher J. Madsen via RT wrote: Show quoted text
> I don't like your suggestion of "URI::file and LWP::UserAgent not > installed" because it could be confusing to people who have one of them > installed and don't understand why it's saying that neither of them is > installed. >
I see. There was misunderstanding whether the message describes what's wrong or what has to be fulfilled. Show quoted text
> How about "both URI::file and LWP::UserAgent needed for these tests"?
That's good. -- Petr
Download (untitled)
application/pgp-signature 230b

Message body not shown because it is not plain text.