Skip Menu |

This queue is for tickets about the Time-modules CPAN distribution.

Report information
The Basics
Id: 60705
Status: resolved
Priority: 0/
Queue: Time-modules

People
Owner: Nobody in particular
Requestors: rt.cpan [...] sartak.org
Cc:
AdminCc:

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



Subject: $ampm undef warning (possibly 5.12-related)
$ perl -wle 'use Time::ParseDate; parsedate("2010-01-01 12:01:01")' Use of uninitialized value $ampm in uc at /home/sartak/.perl/perlbrew/perls/perl-5.12.0/lib/site_perl/5.12.0/Time/ParseDate.pm line 733. Summary of my perl5 (revision 5 version 12 subversion 0) configuration: Platform: osname=darwin, osvers=10.2.0, archname=darwin-2level uname='darwin kaitain.local 10.2.0 darwin kernel version 10.2.0: tue nov 3 10:37:10 pst 2009; root:xnu-1486.2.11~1release_i386 i386 i386 ' config_args='-de -Dprefix=/home/sartak/.perl/perlbrew/perls/perl-5.12.0' hint=recommended, useposix=true, d_sigaction=define useithreads=undef, usemultiplicity=undef useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=define, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/opt/local/include', optimize='-O3', cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/opt/local/include' ccversion='', gccversion='4.2.1 (Apple Inc. build 5646) (dot 1)', gccosandvers='' intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -fstack-protector -L/opt/local/lib' libpth=/opt/local/lib /usr/lib libs=-lgdbm -ldbm -ldl -lm -lutil -lc perllibs=-ldl -lm -lutil -lc libc=/usr/lib/libc.dylib, so=dylib, useshrplib=false, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/opt/local/lib -fstack-protector' Characteristics of this binary (from libperl): Compile-time options: PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF Built under darwin Compiled at Apr 13 2010 11:09:22 %ENV: PERL5LIB="lib/:lib/:" PERLBREW_ROOT="/home/sartak/.perl/perlbrew" @INC: lib/ lib/ /home/sartak/.perl/perlbrew/perls/perl-5.12.0/lib/site_perl/5.12.0/darwin-2level /home/sartak/.perl/perlbrew/perls/perl-5.12.0/lib/site_perl/5.12.0 /home/sartak/.perl/perlbrew/perls/perl-5.12.0/lib/5.12.0/darwin-2level /home/sartak/.perl/perlbrew/perls/perl-5.12.0/lib/5.12.0 .
Subject: $ampm undef warning
RT-Send-CC: 10310218 [...] ticket.noris.net
Hello, I have the same Problem under Windows 64-Bit. I have included also a Patch that fixes the Problem. Module Version: C:\>perl -MTime::ParseDate -e "print $Time::ParseDate::VERSION" 2006.0814 Error generation: C:\>perl -w -MTime::ParseDate=parsedate -le "parsedate('10.09.2010 12:45:12')" Use of uninitialized value $ampm in uc at C:/Perl64/site/lib/Time/ParseDate.pm line 733. Perl Version: C:\>perl -V Summary of my perl5 (revision 5 version 12 subversion 2) configuration: Platform: osname=MSWin32, osvers=5.2, archname=MSWin32-x64-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=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='cl', ccflags ='-nologo -GF -W3 -MD -Zi -DNDEBUG -Ox -GL -fp:precise -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FCRYPT -DWIN64 -DCONSERVATIVE -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO', optimize='-MD -Zi -DNDEBUG -Ox -GL -fp:precise', cppflags='-DWIN32' ccversion='14.00.40310.41', gccversion='', gccosandvers='' intsize=4, longsize=4, ptrsize=8, doublesize=8, byteorder=12345678 d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8 ivtype='__int64', ivsize=8, nvtype='double', nvsize=8, Off_t='__int64', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"C:\Perl64\lib\CORE" -machine:AMD64' 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 comctl32.lib bufferoverflowU.lib msvcrt.lib perllibs= oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib netapi32.lib uuid.libws2_32.lib mpr.lib winmm.lib version.lib odbc32.lib odbccp32.lib comctl32.lib bufferoverflowU.lib msvcrt.lib libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl512.lib gnulibc_version='' Dynamic Linking: dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' ' cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug -opt:ref,icf -ltcg -libpath:"C:\Perl64\lib\CORE" -machine:AMD64' 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_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF USE_SITECUSTOMIZE Locally applied patches: ActivePerl Build 1202 [293621] 1fd8fa4 Add Wolfram Humann to AUTHORS f120055 make string-append on win32 100 times faster a2a8d15 Define _USE_32BIT_TIME_T for VC6 and VC7 007cfe1 Don't pretend to support really old VC++ compilers 6d8f7c9 Get rid of obsolete PerlCRT.dll support d956618 Make Term::ReadLine::findConsole fall back to STDIN if /dev/ttycan't be opened 321e50c Escape patch strings before embedding them in patchlevel.h Built under MSWin32 Compiled at Sep 6 2010 22:53:42 @INC: C:/Perl64/site/lib C:/Perl64/lib . Server Data: Windows Server 2008 R2 Standard (64 Bit) Intel Xeon CPU E5430 2,66 GH 4.00 GB Ram Greeting, Stelios Gikas
Subject: ParseDate_undef_warning.patch
--- ParseDate.pm 2010-10-20 10:49:09.528875936 +0200 +++ ParseDate_fix.pm 2010-10-20 10:50:09.208979443 +0200 @@ -731,7 +731,7 @@ $ampm = $4 || $9 || $11; $$tzr = $12; $$hr += 12 if $ampm and "\U$ampm" eq "PM" && $$hr != 12; - $$hr = 0 if $$hr == 12 && "\U$ampm" eq "AM"; + $$hr = 0 if $ampm and $$hr == 12 && "\U$ampm" eq "AM"; printf "matched at %d, rem = %s.\n", __LINE__, $$tr if $debug; return 1; } elsif ($$tr =~ s#noon(?:\s+|$ )##ix) {
Fixed in the new version (will release shortly)