Subject: | "uninitialized value" warnings under test suite |
I get warnings when running "make test"
If I change line 123 of file lib/Sub/Uplevel.pm
from...
if( $caller[0] eq __PACKAGE__ ) {
to...
if( defined $caller[0] && $caller[0] eq __PACKAGE__ ) {
All tests pass with no warnings.
Show quoted text
>dmake test
cp lib/Sub/Uplevel.pm blib\lib\Sub\Uplevel.pm
C:\vanilla-perl\perl\bin\perl.exe "-MExtUtils::Command::MM" "-e"
"test_harness(0
, 'blib\lib', 'blib\arch')" t/*.t
t/die_check....ok
t/Uplevel......ok 1/18Use of uninitialized value in string eq at
C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
Use of uninitialized value in string eq at C:\Documents and
Settings\cafranks\Desktop\cpan\Sub-Uplevel-0.09\blib\lib/Sub/Uplevel.pm
line 123.
t/Uplevel......ok
All tests successful.
Files=2, Tests=19, 0 wallclock secs ( 0.00 cusr + 0.00 csys = 0.00 CPU)
WinXP XP 2
Show quoted text>perl -V
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=MSWin32, osvers=5.1, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=de
fine
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='gcc', ccflags =' -s -O2 -DWIN32 -DHAVE_DES_FCRYPT
-DPERL_IMPLICIT_CONTE
XT -DPERL_IMPLICIT_SYS -fno-strict-aliasing -DPERL_MSVCRT_READFIX',
optimize='-s -O2',
cppflags='-DWIN32'
ccversion='', gccversion='3.4.5', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='long
long', lseek
size=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='g++', ldflags ='-s -L"c:\vanilla-perl\perl\lib\CORE"
-L"C:\vanilla-perl\
MinGW\lib"'
libpth=C:\vanilla-perl\MinGW\lib
libs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdlg32
-ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32 -lmpr
-lwinmm
-lversion -lodbc32 -lodbccp32
perllibs= -lmsvcrt -lmoldname -lkernel32 -luser32 -lgdi32 -lwinspool
-lcomdl
g32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnetapi32 -luuid -lws2_32
-lmpr -lw
inmm -lversion -lodbc32 -lodbccp32
libc=-lmsvcrt, so=dll, useshrplib=yes, libperl=libperl58.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-mdll -s
-L"c:\vanilla-perl\perl\lib\CORE" -L"C:\
vanilla-perl\MinGW\lib"'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_IMPLICIT_SYS PERL_MALLOC_WRAP
PL_OP_SLAB_ALLOC USE_ITHREADS USE_LARGE_FILES
USE_PERLIO
Built under MSWin32
Compiled at Feb 10 2006 10:33:10
@INC:
c:/vanilla-perl/perl/lib
c:/vanilla-perl/perl/site/lib
.