Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: perl [...] evancarroll.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.70
Fixed in: (no value)



Subject: [PATCH] Fix failing test when libxml comes from git
Currently libxmls built from a git pull break. This is a problem in new releases. not ok 3 # Test 3 got: "20706" (./t/01basic.t at line 12) # Expected: "20706-GITv2.7.6" # ./t/01basic.t line 12 is: ok(XML::LibXML::LIBXML_VERSION, XML::LibXML::LIBXML_RUNTIME_VERSION); Compiled against libxml2 version: 20706 Running libxml2 version: 20706-GITv2.7.6 This patch fixes this with the same hack found in LibXML.pm (as compared to doing it right in the name-space polluting .xs so both hacks can be removed). I don't know XS enough to know how to how to set the RETVAL to only return the stuff before the `-`: const char * LIBXML_RUNTIME_VERSION() CODE: RETVAL = xmlParserVersion; OUTPUT: RETVAL -- Evan Carroll System Lord of the Internets http://www.evancarroll.com
Subject: 0001-Updated-with-the-same-hack-that-is-found-in-LibXML.p.patch
From 6e87fe9688de5f3d12a6e4d45956511535ad5429 Mon Sep 17 00:00:00 2001 From: Evan Carroll <me@evancarroll.com> Date: Wed, 24 Feb 2010 14:45:36 -0600 Subject: [PATCH] Updated with the same hack that is found in LibXML.pm this permits a clean build against libxml(s) that originate from GIT, which is at least where the Debian devs pull from. --- t/01basic.t | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/t/01basic.t b/t/01basic.t index 68ce1be..ecff6fc 100644 --- a/t/01basic.t +++ b/t/01basic.t @@ -9,10 +9,12 @@ ok(1); my $p = XML::LibXML->new(); ok($p); -ok(XML::LibXML::LIBXML_VERSION, XML::LibXML::LIBXML_RUNTIME_VERSION); +my ($runtime_version) = XML::LibXML::LIBXML_RUNTIME_VERSION() =~ /^(\d+)/; + +ok(XML::LibXML::LIBXML_VERSION, $runtime_version); warn "\n\nCompiled against libxml2 version: ",XML::LibXML::LIBXML_VERSION, - "\nRunning libxml2 version: ",XML::LibXML::LIBXML_RUNTIME_VERSION, + "\nRunning libxml2 version: ",$runtime_version, "\n\n"; if (XML::LibXML::LIBXML_VERSION != XML::LibXML::LIBXML_RUNTIME_VERSION) { -- 1.6.3.3
Thanks for the report and the proposed fix. This was fixed in XML-LibXML-1.74 which was just uploaded to CPAN. Regards, -- Shlomi Fish