Skip Menu |

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

Report information
The Basics
Id: 34562
Status: resolved
Priority: 0/
Queue: XML-Smart

People
Owner: TMHARISH [...] cpan.org
Requestors: ian [...] web.com.au
Cc:
AdminCc:

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



Subject: XML-Smart test.pl for URL fails
Date: Mon, 31 Mar 2008 13:18:19 +1100
To: bug-XML-Smart [...] rt.cpan.org
From: Ian McWilliam <ian [...] web.com.au>
The test.pl contains a test for fetching a url and matching the string returned in the XML "sitename" parameter against "Perl Monks". The returning string from the fetched URL does not contain a space between "Perl" and "Monks" and therefor the test always is reported as Error! URL: http://www.perlmonks.org/index.pl?node_id=16046 Do you want to test XML::Smart with an URL? [n] y Getting URL... Test: ERROR! ----------------------------------------------- The XML of the URL: <?xml version="1.0" encoding="iso-8859-1" ?> <?meta name="GENERATOR" content="XML::Smart/1.6.9 Perl/5.010000 [MSWin32]" ?> <XPINFO> <INFO site="http://perlmonks.org/" sitename="PerlMonks" style="" gentimeGMT="2 008-03-31 01:49:03" min_poll_seconds="30" foruser="Anonymous Monk" id="961"> Rendered by the XP XML Ticker</INFO> <XP xp="0" level="1" leveltitle="Initiate" xp2nextlevel="20" votesleft="0"/> </XPINFO> ----------------------------------------------- With the attached patch to test.pl, the test will succeed. URL: http://www.perlmonks.org/index.pl?node_id=16046 Do you want to test XML::Smart with an URL? [n] y Getting URL... Test: OK C:\build\perl modules\XML-Smart-1.6.9>perl -V Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Platform: osname=MSWin32, osvers=5.00, archname=MSWin32-x86-multi-thread uname='' config_args='undef' hint=recommended, useposix=true, d_sigaction=undef useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=undef, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -O1 -DWIN32 - D_CONSOLE - DNO_STRICT -DHAVE_DES_FCRYPT -DUSE_SITECUSTOMIZE -DPRIVLIB_LAST_IN_INC -DPERL_IM PLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -DPERL_MSVCRT_READFIX', optimize='-MD -Zi -DNDEBUG -O1', cppflags='-DWIN32' ccversion='12.00.8804', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=10 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64', lseeksi ze=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf - libpath:"c: \perl\lib\CORE" -machine:x86' libpth=\lib libs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32 .lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_ 32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comd lg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl510.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug - opt:ref,icf - libpath:"c:\perl\lib\CORE" -machine:x86' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS PERL_MALLOC_WRAP PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 1001 [283495] Built under MSWin32 Compiled at Dec 18 2007 08:46:15 @INC: c:/perl/site/lib c:/perl/lib . ------------------------------------------------------------------------------------------------ --- test.pl.orig 2008-03-31 13:08:44.668544000 +1100 +++ test.pl 2008-03-31 13:09:23.227713600 +1100 @@ -1259,7 +1259,7 @@ my $XML = XML::Smart->new($url , 'XML::Smart::Parser') ; print "Test: " ; - if ( $XML->{XPINFO}{INFO}{sitename} eq 'Perl Monks' ) { print "OK\n" ;} + if ( $XML->{XPINFO}{INFO}{sitename} eq 'PerlMonks' ) { print "OK \n" ;} else { print "ERROR!\n" ; print "-----------------------------------------------\n" ; ------------------------------------------------------------------------------------------------- Ian McWilliam ian@web.com.au Webtech IT Solutions
Fixed in 1.71 Thank you for your feedback and fix.