From: Chip Salzenberg Date: Tue, 14 Jan 1997 04:01:03 +0000 (+1200) Subject: Avoid "uninitialized" warnings from POSIX::constant() X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3f73d1e9321c4a88755d416e8a3bef027db02853;p=p5sagit%2Fp5-mst-13.2.git Avoid "uninitialized" warnings from POSIX::constant() --- diff --git a/ext/POSIX/POSIX.pm b/ext/POSIX/POSIX.pm index 31ee642..b095ffe 100644 --- a/ext/POSIX/POSIX.pm +++ b/ext/POSIX/POSIX.pm @@ -194,7 +194,7 @@ sub AUTOLOAD { local $! = 0; my $constname = $AUTOLOAD; $constname =~ s/.*:://; - my $val = constant($constname, $_[0]); + my $val = constant($constname, @_ ? $_[0] : 0); if ($! == 0) { *$AUTOLOAD = sub { $val }; }