Skip Menu |

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

Report information
The Basics
Id: 38783
Status: open
Priority: 0/
Queue: XML-Twig

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

Bug Information
Severity: Normal
Broken in: 3.32
Fixed in: (no value)



Subject: XML::Twig indented_c complains about Text::Wrap
Ciao mirod, it seems that Text::Wrap isn't loaded correctly when using XML::Twig. I haven't dug the source, but I've prepared a test file with the output I get in my platform (linux) and perl (5.8.8 without threads). Let me know if you need more information about my setup. Ciao, Flavio.
Subject: xmltwig-pretty.t
# vim: filetype=perl : use strict; use warnings; use Test::More tests => 4; # last test to print use Test::Exception; use XML::Twig; my $twig; lives_ok { $twig = XML::Twig->new(pretty_print => 'indented_c'); } 'twig creation lives'; lives_ok { my $doc = '<whatever><indented>Hello, world!</indented></whatever>'; $twig->parse($doc) } 'twig parsing lives'; lives_ok { local *STDOUT; $twig->print(); } 'twig printing lives'; lives_ok { local *STDOUT; require Text::Wrap; $twig->print(); } 'twig printing lives after requiring Text::Wrap'; __END__ xmltwig-pretty...... 1..4 ok 1 - twig creation lives ok 2 - twig parsing lives not ok 3 - twig printing lives # Failed test 'twig printing lives' # at xmltwig-pretty.t line 23. # died: Undefined subroutine &Text::Wrap::wrap called at /opt/perl-5.8.8/lib/site_perl/5.8.8/XML/Twig.pm line 7729. ok 4 - twig printing lives after requiring Text::Wrap # Looks like you failed 1 test of 4. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/4 subtests Test Summary Report ------------------- xmltwig-pretty.t (Wstat: 256 Tests: 4 Failed: 1) Failed test: 3 Non-zero exit status: 1 Files=1, Tests=4, 0 wallclock secs ( 0.00 usr 0.00 sys + 0.02 cusr 0.10 csys = 0.12 CPU) Result: FAIL
Subject: Re: [rt.cpan.org #38783] XML::Twig indented_c complains about Text::Wrap
Date: Thu, 28 Aug 2008 13:21:23 +0200
To: bug-XML-Twig [...] rt.cpan.org
From: "Michel Rodriguez" <xmltwig [...] gmail.com>
On Thu, Aug 28, 2008 at 11:08 AM, Flavio Poletti via RT <bug-XML-Twig@rt.cpan.org> wrote: Show quoted text
> Thu Aug 28 05:08:00 2008: Request 38783 was acted upon. > Transaction: Ticket created by POLETTIX > Queue: XML-Twig > Subject: XML::Twig indented_c complains about Text::Wrap > Broken in: 3.32 > Severity: Normal > Owner: Nobody > Requestors: polettix@cpan.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=38783 > > > > Ciao mirod, > > it seems that Text::Wrap isn't loaded correctly when using XML::Twig. > > I haven't dug the source, but I've prepared a test file with the output > I get in my platform (linux) and perl (5.8.8 without threads). Let me > know if you need more information about my setup. > > Ciao, > > Flavio. >
Weird, Your test runs fine, with or without the require Text::Wrap; line. What version of Text::Wrap are you using? Here is my config, from run t/zz_dump_config.t: perl: 5.008008 OS: linux - i686-linux XML::Parser : 2.36 (required) expat : 2.0.1 (required) Scalar::Util : 1.19 (for improved memory management) Encode : 2.26 (for encoding conversions) LWP : 5.814 (for the parseurl method) HTML::Entities : 1.35 (for the html_encode filter) Tie::IxHash : 1.21 (for the keep_atts_order option) XML::XPathEngine : 0.11 (to use XML::Twig::XPath) XML::XPath : <not available> (to use XML::Twig::XPath if Tree::XPathEngine not available) HTML::TreeBuilder : 3.23 (to use parse_html and parsefile_html) Text::Wrap : 2006.1117 (to use the "wrapped" option for pretty_print) Test : 1.25 (for testing purposes) Test::Pod : 1.26 (for testing purposes) XML::Simple : 2.18 (for testing purposes) XML::Handler::YAWriter : 0.23 (for testing purposes) XML::SAX::Writer : 0.50 (for testing purposes) XML::Filter::BufferText : 1.01 (for testing purposes) IO::Scalar : 2.110 (for testing purposes) -- mirod
Subject: Re: [rt.cpan.org #38783] XML::Twig indented_c complains about Text::Wrap
Date: Thu, 28 Aug 2008 22:48:30 +0200 (CEST)
To: bug-XML-Twig [...] rt.cpan.org
From: "Flavio Poletti" <flavio [...] polettix.it>
Ciao mirod, here's my stuff: Configuration: perl: 5.008008 OS: linux - i686-linux XML::Parser : 2.36 (required) expat : <no version information found> Scalar::Util : 1.19 (for improved memory management) Encode : 2.12 (for encoding conversions) LWP : 5.808 (for the parseurl method) HTML::Entities : 1.35 (for the html_encode filter) Tie::IxHash : <not available> (for the keep_atts_order option) XML::XPathEngine : <not available> (to use XML::Twig::XPath) XML::XPath : <not available> (to use XML::Twig::XPath if Tree::XPathEngine not available) HTML::TreeBuilder : 3.23 (to use parse_html and parsefile_html) Text::Wrap : 2006.1117 (to use the "wrapped" option for pretty_print) Test : 1.25 (for testing purposes) Test::Pod : 1.26 (for testing purposes) XML::Simple : <not available> (for testing purposes) XML::Handler::YAWriter : <not available> (for testing purposes) XML::SAX::Writer : <not available> (for testing purposes) XML::Filter::BufferText : <not available> (for testing purposes) IO::Scalar : <not available> (for testing purposes) If you need additional info, or you'd like me to run some additional tests etc. just ask! Ciao, Flavio.