Skip Menu |

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

Report information
The Basics
Id: 6067
Status: resolved
Priority: 0/
Queue: XML-Twig

People
Owner: Nobody in particular
Requestors: Dan [...] DWright.Org
Cc:
AdminCc:

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



Subject: XML::Twig doesn't work in 5.6.1 if Scalar::Util is installed.
From Twig.pm lines 95..99: { local $SIG{__DIE__}; if( eval 'require Scalar::Util') { import Scalar::Util qw(weaken); $weakrefs= 1; } elsif( eval 'require WeakRef') { import WeakRef; $weakrefs= 1; } else { $weakrefs= 0; } } This won't work in Perl 5.6.1 if you have Scalar::Util installed. The problem is that when you try to import weaken from Scalar::Util, it will Carp::Croak an error message: "Weak references are not implemented in the version of perl" After that, the call to 'require WeakRef' never actually happens.
Date: Mon, 19 Apr 2004 14:31:00 +0200 (CEST)
From: Michel Rodriguez <mirod [...] xmltwig.com>
To: via RT <bug-XML-Twig [...] rt.cpan.org>
Subject: Re: [xmltwig] [cpan #6067] XML::Twig doesn't work in 5.6.1 if Scalar::Util is installed.
RT-Send-Cc:
On Mon, 19 Apr 2004, via RT wrote: Show quoted text
> This message about XML-Twig was sent to you by DWRIGHT <DWRIGHT@cpan.org> via rt.cpan.org > > Full context and any attached attachments can be found at: > <URL: https://rt.cpan.org/Ticket/Display.html?id=6067 > > > From Twig.pm lines 95..99: > > { local $SIG{__DIE__}; > if( eval 'require Scalar::Util') { import Scalar::Util qw(weaken); $weakrefs= 1; } > elsif( eval 'require WeakRef') { import WeakRef; $weakrefs= 1; } > else { $weakrefs= 0; } > } > > This won't work in Perl 5.6.1 if you have Scalar::Util installed. The > problem is that when you try to import weaken from Scalar::Util, it will > Carp::Croak an error message: > > "Weak references are not implemented in the version of perl" > > After that, the call to 'require WeakRef' never actually happens.
You need to upgrade Scalar::Util. I will add more tests in the next version to detect the case where the version of Scalar::Util that's installed does not include weaken. Which version is intalled on your system? Are you running on RedHat? Thanks -- Michel Rodriguez Perl &amp; XML http://www.xmltwig.com
[wright@smx.pair.com - Mon Apr 19 12:01:44 2004]: Show quoted text
> package Scalar::Util; > $VERSION = $VERSION = $List::Util::VERSION; > > List::Util appears to be version 1.02. >
> > Are you running on RedHat?
> > No, FreeBSD 4-STABLE
This is very weird, as weaken is in Scalar-Lists::Utils since 1.01: At http://search.cpan.org/src/GBARR/Scalar-List-Utils-1.13/ChangeLog Change 366 on 2000/03/03 by <gbarr@pobox.com> (Graham Barr) Release 1.01 [...] Change 273 on 1999/03/21 by <gbarr@pobox.com> (Graham Barr) Added weaken and isweak to Ref::Util I will try to detect this, but testing might be a tad difficult, as I don't have the version of Scalar-List-Utils that you are using. Do you have the source for that module? Note also that hidden deep in the docs is the sentence: "When in doubt, upgrade expat, XML::Parser and Scalar::Util". Thanks __ Mirod
Hi, Could you test the development version at http://xmltwig.com/xmltwig/XML-Twig-3.16.tar.gz to see if it works better. Thanks __ Mirod