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> |
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