Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

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

Report information
The Basics
Id: 75505
Status: resolved
Priority: 0/
Queue: XML-LibXML

People
Owner: Nobody in particular
Requestors: MARKOV [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Critical
Broken in: 1.93
Fixed in: (no value)



Subject: XML::LibXML::Element overload still not correct
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 232
Download (untitled) / with headers
text/plain 232b
Use of overload is not simple. 1.93 has fixed some of the problems which came up with introducing overload on ::Element, but not all. XML::Compile uses != between elements. This still does not work. Maybe a fallback setting.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-12231-1330777216-726.75505-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 520
Download (untitled) / with headers
text/plain 520b
Hi, On Sat Mar 03 05:55:11 2012, MARKOV wrote: Show quoted text
> Use of overload is not simple. 1.93 has fixed some of the problems > which came up with introducing overload on ::Element, but not all. > XML::Compile uses != between elements. This still does not work. > Maybe a fallback setting.
I recall something about testing "!=", but maybe I was wrong. In any case, can you provide a patch to t/71overloads.t (right at the bottom) to test for it (and fail in part)? That would really be helpful. Regards, -- Shlomi Fish
From markov [...] overmeer.net Sat Mar 3 14: 34:39 2012
MIME-Version: 1.0
X-Spam-Status: No, score=-3.497 tagged_above=-99.9 required=10 tests=[AWL=-1.597, BAYES_00=-1.9] autolearn=ham
In-Reply-To: <rt-3.8.HEAD-12231-1330777217-325.75505-6-0 [...] rt.cpan.org>
Content-Disposition: inline
X-Spam-Flag: NO
References: <RT-Ticket-75505 [...] rt.cpan.org> <rt-3.8.HEAD-12231-1330777217-325.75505-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Message-ID: <20120303193424.GA12999 [...] moon.overmeer.net>
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -3.497
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id ADE1724002D for <cpan-bug+xml-libxml [...] hipster.bestpractical.com>; Sat, 3 Mar 2012 14:34:39 -0500 (EST)
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 niadRKNg-GvW for <cpan-bug+xml-libxml [...] hipster.bestpractical.com>; Sat, 3 Mar 2012 14:34:37 -0500 (EST)
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by hipster.bestpractical.com (Postfix) with SMTP id 9485D24001E for <bug-xml-libxml [...] rt.cpan.org>; Sat, 3 Mar 2012 14:34:36 -0500 (EST)
Received: (qmail 17437 invoked by uid 103); 3 Mar 2012 19:34:36 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 3 Mar 2012 19:34:36 -0000
Received: from fep16.mx.upcmail.net (HELO fep16.mx.upcmail.net) (62.179.121.36) by 16.mx.develooper.com (qpsmtpd/0.80/v0.80-19-gf52d165) with ESMTP; Sat, 03 Mar 2012 11:34:31 -0800
Received: from edge02.upcmail.net ([192.168.13.237]) by viefep16-int.chello.at (InterMail vM.8.01.05.04 201-2260-151-105-20111014) with ESMTP id <20120303193427.RAKJ1551.viefep16-int.chello.at [...] edge02.upcmail.net> for <bug-xml-libxml [...] rt.cpan.org>; Sat, 3 Mar 2012 20:34:27 +0100
Received: from moon.overmeer.net ([178.84.121.203]) by edge02.upcmail.net with edge id h7aR1i00S4PQHKm027aRTK; Sat, 03 Mar 2012 20:34:27 +0100
Received: by moon.overmeer.net (Postfix, from userid 1000) id 2E0663CFE; Sat, 3 Mar 2012 20:34:24 +0100 (CET)
Delivered-To: cpan-bug+xml-libxml [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #75505] XML::LibXML::Element overload still not correct
User-Agent: Mutt/1.5.21 (2010-09-15)
Return-Path: <markov [...] overmeer.net>
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: cpan-bug+xml-libxml [...] hipster.bestpractical.com
X-RT-Mail-Extension: xml-libxml
Date: Sat, 3 Mar 2012 20:34:24 +0100
X-Sourceip: 178.84.121.203
X-Spam-Level:
To: Shlomi Fish via RT <bug-XML-LibXML [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
RT-Message-ID: <rt-3.8.HEAD-10813-1330803280-850.75505-0-0 [...] rt.cpan.org>
Content-Length: 1445
Download (untitled) / with headers
text/plain 1.4k
* Shlomi Fish via RT (bug-XML-LibXML@rt.cpan.org) [120303 12:20]: Show quoted text
> I recall something about testing "!=", but maybe I was wrong. In any > case, can you provide a patch to t/71overloads.t (right at the bottom) > to test for it (and fail in part)? That would really be helpful.
Very simplistic extension. --- t/71overloads.t 2012-03-03 20:29:04.628721426 +0100 +++ t/71overloads.t.orig 2012-02-27 10:11:11.000000000 +0100 @@ -1,6 +1,6 @@ use strict; use warnings; -use Test::More tests => 24; +use Test::More tests => 22; use XML::LibXML; my $root = XML::LibXML->load_xml( IO => \*DATA )->documentElement; @@ -158,30 +158,12 @@ '== negative comparison', ); -is_deeply( - [($root == 'not-root')], - [''], - '== negative comparison', -); - -is_deeply( - [!($root != 'not-root')], - [''], - '!== negative comparison', -); - # TEST is_deeply( [($root eq 'not-root')], [''], 'eq negative comparison', ); - -is_deeply( - [!($root ne 'not-root')], - [''], - 'eq negative comparison', -); -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions drs Mark A.C.J. Overmeer MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
MIME-Version: 1.0
In-Reply-To: <rt-3.8.HEAD-10813-1330803280-850.75505-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
References: <RT-Ticket-75505 [...] rt.cpan.org> <rt-3.8.HEAD-12231-1330777217-325.75505-6-0 [...] rt.cpan.org> <20120303193424.GA12999 [...] moon.overmeer.net> <rt-3.8.HEAD-10813-1330803280-850.75505-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="UTF-8"
Message-ID: <rt-3.8.HEAD-10811-1330805735-269.75505-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1609
Download (untitled) / with headers
text/plain 1.5k
Hi Mark, On Sat Mar 03 14:34:40 2012, Mark@Overmeer.net wrote: Show quoted text
> * Shlomi Fish via RT (bug-XML-LibXML@rt.cpan.org) [120303 12:20]:
> > I recall something about testing "!=", but maybe I was wrong. In any > > case, can you provide a patch to t/71overloads.t (right at the bottom) > > to test for it (and fail in part)? That would really be helpful.
> > Very simplistic extension. > > --- t/71overloads.t 2012-03-03 20:29:04.628721426 +0100 > +++ t/71overloads.t.orig 2012-02-27 10:11:11.000000000 +0100 > @@ -1,6 +1,6 @@ > use strict; > use warnings; > -use Test::More tests => 24; > +use Test::More tests => 22; > use XML::LibXML; > > my $root = XML::LibXML->load_xml( IO => \*DATA )->documentElement; > @@ -158,30 +158,12 @@ > '== negative comparison', > ); > > -is_deeply( > - [($root == 'not-root')], > - [''], > - '== negative comparison', > -); > - > -is_deeply( > - [!($root != 'not-root')], > - [''], > - '!== negative comparison', > -); > - > # TEST > is_deeply( > [($root eq 'not-root')], > [''], > 'eq negative comparison', > ); > - > -is_deeply( > - [!($root ne 'not-root')], > - [''], > - 'eq negative comparison', > -); >
Thanks for the patch. I applied it, corrected it, fixed the bug and uploaded XML-LibXML-1.94 to CPAN which should fix it. A few comments about the patch: 1. It is reversed. 2. It lacked Test::Count annotations and the test count was wrong because you added three assertions and added only 2 to it. Next time, please read HACKING.txt and maybe use "hg diff" to generate the patch. Regards, — Shlomi Fish


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.