CC: | bug-Crypt-Primes [...] rt.cpan.org |
Subject: | [PATCH] Suppress "uninitialized value" warnings from Crypt::Primes |
Date: | Thu, 25 Jan 2007 08:47:51 +0100 |
To: | mail [...] vipul.net |
From: | Dominic Dunlop <dominic.dunlop.001 [...] student.uni.lu> |
Thank you for Crypt::Primes. May I propose this tiny patch to v0.50
so as to suppress "uninitialized value" warnings when it is used from
a script that has warnings enabled?
--- Primes.pm~ 2003-01-16 21:08:32.000000000 +0100
+++ Primes.pm 2007-01-25 08:39:36.000000000 +0100
@@ -563,7 +563,8 @@
my ( %params ) = @_;
my $k = $params { Size }; #-- bitsize of the required
prime.
- my $v = $params { Verbosity }; #-- process reporting verbosity.
+ my $v =
+ $params { Verbosity } || 0; #-- process reporting verbosity.
#-- whether to find
intermediate generators.
my $p0 = 20; #-- generate primes of
bitsize less
#-- than $p0 with nextprime().
For what it's worth, the perl I'm using is
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=darwin, osvers=8.7.0, archname=darwin-thread-multi-2level
uname='darwin tullamore.local 8.7.0 darwin kernel version 8.7.0:
fri may 26 15:20:53 pdt 2006; root:xnu-792.6.76.obj~1release_ppc
power macintosh powerpc '
config_args='-de -Duseshrplib -Dusethreads'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=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='cc', ccflags ='-fno-common -DPERL_DARWIN -no-cpp-precomp -
fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/
include -I/opt/local/include',
optimize='-O3',
cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-
precomp -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/
usr/local/include -I/opt/local/include'
ccversion='', gccversion='4.0.1 (Apple Computer, Inc. build
5363)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=4, 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 =' -L/usr/
local/lib -L/opt/local/lib'
libpth=/usr/local/lib /opt/local/lib /usr/lib
libs=-lgdbm -ldbm -ldb -ldl -lm -lc
perllibs=-ldl -lm -lc
libc=/usr/lib/libc.dylib, so=dylib, useshrplib=true,
libperl=libperl.dylib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/
usr/local/lib -L/opt/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES
USE_PERLIO USE_REENTRANT_API
Built under darwin
Compiled at Sep 20 2006 20:11:45
@INC:
/usr/local/lib/perl5/5.8.8/darwin-thread-multi-2level
/usr/local/lib/perl5/5.8.8
/usr/local/lib/perl5/site_perl/5.8.8/darwin-thread-multi-2level
/usr/local/lib/perl5/site_perl/5.8.8
/usr/local/lib/perl5/site_perl
.
--
Dominic Dunlop MICS I
###########################################
This message has been scanned by F-Secure Anti-Virus for Microsoft Exchange.
For more information, connect to http://www.f-secure.com/