Subject: | retrieve broken with XML::Dumper |
Date: | Thu, 13 Mar 2008 10:44:47 -0400 |
To: | "'bug-Data-Serializer [...] rt.cpan.org'" <bug-Data-Serializer [...] rt.cpan.org> |
From: | "Gowing, Charles" <charles.gowing [...] novainfo.com> |
This may be related to bug #23901. First the basic info:
Module version info
Show quoted text
cpan> i Data::Serializer
CPAN: Storable loaded ok (v2.15)
Going to read C:\DOCUME~1\CGowing\LOCALS~1\Temp\cpan\Metadata
Database was generated on Wed, 12 Mar 2008 18:30:48 GMT
Strange distribution name [Data::Serializer]
Module id = Data::Serializer
DESCRIPTION Generic interface to serializer modules
CPAN_USERID NEELY (Neil A. Neely <neil@neely.cx>)
CPAN_VERSION 0.43
CPAN_FILE N/NE/NEELY/Data-Serializer-0.43.tar.gz
UPLOAD_DATE 2007-12-20
DSLIP_STATUS RdpOp (released,developer,perl,object-oriented,Standard-Perl)
MANPAGE Data::Serializer:: - Modules that serialize data structures
INST_FILE C:\strawberry-perl\perl\site\lib\Data\Serializer.pm
INST_VERSION 0.43
Show quoted textcpan> i XML::Dumper
Strange distribution name [XML::Dumper]
Module id = XML::Dumper
DESCRIPTION Converts XML from/to Perl code
CPAN_USERID MIKEWONG (Mike Wong <mike_w3@pacbell.net>)
CPAN_VERSION 0.81
CPAN_FILE M/MI/MIKEWONG/XML-Dumper-0.81.tar.gz
UPLOAD_DATE 2006-04-05
DSLIP_STATUS ampO? (alpha,mailing-list,perl,object-oriented,)
MANPAGE XML::Dumper - Perl module for dumping Perl objects from/to XML
INST_FILE C:\strawberry-perl\perl\site\lib\XML\Dumper.pm
INST_VERSION 0.81
Show quoted textcpan> i XML::Parser
CPAN: Storable loaded ok (v2.15)
Going to read C:\DOCUME~1\CGowing\LOCALS~1\Temp\cpan\Metadata
Database was generated on Wed, 12 Mar 2008 18:30:48 GMT
Strange distribution name [XML::Parser]
Module id = XML::Parser
DESCRIPTION Flexible fast parser with plug-in styles
CPAN_USERID COOPERCL (Clark Cooper <clark@coopercc.net>)
CPAN_VERSION 2.36
CPAN_FILE M/MS/MSERGEANT/XML-Parser-2.36.tar.gz
UPLOAD_DATE 2007-11-20
DSLIP_STATUS bmcO? (beta,mailing-list,C,object-oriented,)
MANPAGE XML::Parser - A perl module for parsing XML documents
INST_FILE C:\strawberry-perl\perl\site\lib\XML\Parser.pm
INST_VERSION 2.36
Perl version info
I'm usign Strawberry Perl:
C:\chas_sandbox\grammars>perl -v
This is perl, v5.8.8 built for MSWin32-x86-multi-thread
Copyright 1987-2006, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
I have expat installed from expat-win32bin-2.0.1.exe (no small feat in itself - check out http://www.mike-a-roni.com/2008/01/04/strawberry-perl-expat-xmlparser-and-you/)
OS Vendor and Version
I'm on Windows XP:
C:\strawberry-perl\expat\Bin>ver
Microsoft Windows XP [Version 5.1.2600]
Now for the bug
I'm trying to use store/retrieve with the XML::Dumper serializer and get:
no element found at line 1, column 10, byte 10 at C:/strawberry-perl/perl/site/l
ib/XML/Parser.pm line 187
I'm using this fairly straightforward harness to test it:
#/usr/bin/perl -Wl
use strict;
use warnings;
use Data::Dumper;
use Data::Serializer;
my $datatostore = ['samplecomplexdata',
['list','of','strings'],
{hash=>'of',more=>'data'}
];
my $datafromretrieve;
my $Dserializer = Data::Serializer->new(portable => '0',serializer => 'Data::Dumper');
my $outfile = 'data.out';
print Dumper($datatostore);
$Dserializer->store(
$datatostore,
$outfile,
'>>'
);
$datafromretrieve = $Dserializer->retrieve(
$outfile
);
print Dumper($datafromretrieve);
#######################################
#now as xml
my $Xserializer = Data::Serializer->new(portable => '0',serializer => 'XML::Dumper');
$outfile = 'data.xml';
print Dumper($datatostore);
$Xserializer->store(
$datatostore,
$outfile,
'>>'
);
$datafromretrieve = $Xserializer->retrieve(
$outfile
);
print Dumper($datafromretrieve);
and getting the following output:
C:\chas_sandbox\grammars>retrievedemo.pl
$VAR1 = [
'samplecomplexdata',
[
'list',
'of',
'strings'
],
{
'hash' => 'of',
'more' => 'data'
}
];
$VAR1 = [
'samplecomplexdata',
[
'list',
'of',
'strings'
],
{
'hash' => 'of',
'more' => 'data'
}
];
$VAR1 = [
'samplecomplexdata',
[
'list',
'of',
'strings'
],
{
'hash' => 'of',
'more' => 'data'
}
];
no element found at line 1, column 10, byte 10 at C:/strawberry-perl/perl/site/l
ib/XML/Parser.pm line 187
C:\chas_sandbox\grammars>
-----------------------------------------
Note: The information contained in this email and in any
attachments is intended only for the person or entity to which it
is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use
of, or taking of any action in reliance upon, this information by
persons or entities other than the intended recipient is
prohibited. The recipient should check this email and any
attachments for the presence of viruses. Sender accepts no
liability for any damages caused by any virus transmitted by this
email. If you have received this email in error, please notify us
immediately by replying to the message and delete the email from
your computer. This e-mail is and any response to it will be
unencrypted and, therefore, potentially unsecure. Thank you. NOVA
Information Systems, Inc.
Message body is not shown because it is too large.