Skip Menu |
 

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

Report information
The Basics
Id: 86253
Status: open
Priority: 0/
Queue: XML-Reader

People
Owner: Nobody in particular
Requestors: stefan.zwijsen [...] tonyx.be
Cc:
AdminCc:

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



CC: Bert Tibergijn <bert.tibergijn [...] gmail.com>
Subject: Error - "undefined value in Reader.pm line 113"
Date: Wed, 19 Jun 2013 13:22:42 +0200
To: bug-XML-Reader [...] rt.cpan.org
From: Stefan Zwijsen - TONYX <stefan.zwijsen [...] tonyx.be>
Download (untitled) / with headers
text/plain 1.9k
Hello, We notice a problem using XML::Reader // XML::Parser. When using the example from the Reader documentation (see below) weget this *error message*: Show quoted text
>>>
Software error: Can't call method "new" on an undefined value at /opt/cpanel/perl5/514/site_lib/XML/Reader.pm line 113. <<< *INFO:* # uname -a Linux <servername removed> 2.6.32-358.6.1.el6.x86_64 #1 SMP Tue Apr 23 19:29:00 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux # /usr/local/cpanel/3rdparty/perl/514/bin/perl -v This is perl 5, version 14, subversion 3 (v5.14.3) built for x86_64-linux-64int (with 4 registered patches, see perl -V for more detail) Module versions: XML::Parser 2.36 XML::Parser::Expat 2.36 XML::Parser::Style::Stream undef XML::Parser::Style::Tree undef XML::Parser::Style::Debug undef XML::Parser::Style::Subs undef XML::Parser::Style::Objects undef XML::Reader 0.49 XML::Parsepp 0.06 XML::TokeParser 0.05 XML::Reader::RS 0.02 XML::Reader::Testcases 0.49 XML::Reader::PP 0.02 XML::Parser::Lite 0.717 XML::Parser 2.36 XML::Parser::Expat 2.36 XML::Parser::Style::Stream undef XML::Parser::Style::Tree undef XML::Parser::Style::Debug undef XML::Parser::Style::Subs undef XML::Parser::Style::Objects undef *Test **c**ode *that generates the error: Show quoted text
>>>
#!/usr/local/cpanel/3rdparty/bin/perl use CGI qw(:standard); use CGI::Session; use CGI::Carp qw(fatalsToBrowser); use XML::Reader; $session = new CGI::Session(); print $session->header(); my $text = q{<init>n <?test pi?> t<page node="400">m <!-- remark --> r</page></init>}; my $rdr = XML::Reader->new(\$text); while ($rdr->iterate) { printf "Path: %-19s, Value: %s\n", $rdr->path, $rdr->value; } <<< When we use "use XML::Reader qw(XML::Parsepp);" is does work. But since the XML::Parser module is installed and up-to-date I would expect that to work too... Can you help us out? Any clue on what the problem can be? Kind regards, Stefan Zwijsen TONYX stefan.zwijsen@tonyx.be
RT-Send-CC: bert.tibergijn [...] gmail.com
Download (untitled) / with headers
text/plain 926b
Le Mer 19 Juin 2013 07:26:47, stefan.zwijsen@tonyx.be a écrit : Show quoted text
> Hello, > We notice a problem using XML::Reader // XML::Parser. > XML::Reader 0.49 > XML::Reader::RS 0.02
Show quoted text
> *Test **c**ode *that generates the error: > #!/usr/local/cpanel/3rdparty/bin/perl > use CGI qw(:standard); > use CGI::Session; > use CGI::Carp qw(fatalsToBrowser); > use XML::Reader;
Show quoted text
> When we use "use XML::Reader qw(XML::Parsepp);" is does work. > But since the XML::Parser module is installed and up-to-date I would > expect that to work too...
The interface has changed over time: It used to be a simple "use XML::Reader;" which loaded XML::Parser by default. But this has changed... ...in order to make XML::Reader work with XML::Parser, you now should "use XML::Reader qw(XML::Parser);" or, you can always "use XML::Reader::RS;" (XML::Reader::RS is a simple replacement for "XML::Reader qw(XML::Parser)") Let me know if that helps.


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.