Subject: | I've fixed Math::VecStat to build under Perl 5.8 |
On ActivePerl 5.8 on Windows XP, Math::VecStat breaks on test 36 of Math-VecStat.t. This is because Perl 5.8 sorts slightly differently than perl 5.6. This patch fixes this problem so that Math::VecStat works on both perl 5.6 and perl 5.8.
--- VecStat.t 2003-04-13 17:06:07.000000000 -0400
+++ VecStat.t 2003-04-13 17:06:44.000000000 -0400
@@ -166,7 +166,7 @@
t();
my $a = median( [1,1,2,3,4,3,2,3,4,5] );
-$main::ok = ($a->[0] == 3) && ($a->[1] == 3);
+$main::ok = ($a->[0] == 3) && ($a->[1] >= 3) && ($a->[1] <= 5);
t();
$a = median( [1,2,2,3] );
C:\home\david\.cpan\build\Math-VecStat-0.06>perl -v
This is perl, v5.8.0 built for MSWin32-x86-multi-thread
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2002, Larry Wall
Binary build 804 provided by ActiveState Corp. http://www.ActiveState.com
Built 23:15:13 Dec 1 2002
C:\home\david\.cpan\build\Math-VecStat-0.06>perl -V
Summary of my perl5 (revision 5 version 8 subversion 0) configuration:
Platform:
osname=MSWin32, osvers=4.0, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=undef use5005threads=undef useithreads=define usemultiplicity=def
ine
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 -DNDEBUG -O1 -DWIN32 -D_CONSOLE -DNO_
STRICT -DHAVE_DES_FCRYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERL
IO -DPERL_MSVCRT_READFIX',
optimize='-MD -DNDEBUG -O1',
cppflags='-DWIN32'
ccversion='', 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 -release -libpath:"C:\Perl\lib\C
ORE" -machine:x86'
libpth="C:\Program Files\Intel\Compiler60\IA32\Lib" "C:\Perl\lib\CORE"
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 wsoc
k32.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
wsock32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib msvcrt.lib
libc=msvcrt.lib, so=dll, useshrplib=yes, libperl=perl58.lib
gnulibc_version='undef'
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -release -libpath:"C:
\Perl\lib\CORE" -machine:x86'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_
CONTEXT PERL_IMPLICIT_SYS
Locally applied patches:
ActivePerl Build 804
Built under MSWin32
Compiled at Dec 1 2002 23:15:13
@INC:
C:/Perl/lib
C:/Perl/site/lib
.
--- VecStat.t 2003-04-13 17:06:07.000000000 -0400
+++ VecStat.t 2003-04-13 17:06:44.000000000 -0400
@@ -166,7 +166,7 @@
t();
my $a = median( [1,1,2,3,4,3,2,3,4,5] );
-$main::ok = ($a->[0] == 3) && ($a->[1] == 3);
+$main::ok = ($a->[0] == 3) && ($a->[1] >= 3) && ($a->[1] <= 5);
t();
$a = median( [1,2,2,3] );