From 03136e130d992186c97de0acd23f4857b1a277da Mon Sep 17 00:00:00 2001 From: Chip Salzenberg Date: Wed, 30 Apr 1997 00:00:00 +1200 Subject: Reset errno after failed piped close (this is the same change as commit 00db273fa22ecba6466df777a772c6017c403a96, but as applied) --- lib/Time/gmtime.pm | 7 ++++--- lib/Time/localtime.pm | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'lib/Time') diff --git a/lib/Time/gmtime.pm b/lib/Time/gmtime.pm index 7ca12bb981..c1d11d74db 100644 --- a/lib/Time/gmtime.pm +++ b/lib/Time/gmtime.pm @@ -4,7 +4,7 @@ use Time::tm; BEGIN { use Exporter (); - use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); + use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); @ISA = qw(Exporter Time::tm); @EXPORT = qw(gmtime gmctime); @EXPORT_OK = qw( @@ -13,6 +13,7 @@ BEGIN { $tm_isdst ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); + $VERSION = 1.01; } use vars @EXPORT_OK; @@ -27,8 +28,8 @@ sub populate (@) { return $tmob; } -sub gmtime (;$) { populate CORE::gmtime(shift||time)} -sub gmctime (;$) { scalar CORE::gmtime(shift||time)} +sub gmtime (;$) { populate CORE::gmtime(@_ ? shift : time)} +sub gmctime (;$) { scalar CORE::gmtime(@_ ? shift : time)} 1; __END__ diff --git a/lib/Time/localtime.pm b/lib/Time/localtime.pm index 8d72da159a..9437752597 100644 --- a/lib/Time/localtime.pm +++ b/lib/Time/localtime.pm @@ -4,7 +4,7 @@ use Time::tm; BEGIN { use Exporter (); - use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); + use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION); @ISA = qw(Exporter Time::tm); @EXPORT = qw(localtime ctime); @EXPORT_OK = qw( @@ -13,6 +13,7 @@ BEGIN { $tm_isdst ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); + $VERSION = 1.01; } use vars @EXPORT_OK; @@ -27,8 +28,8 @@ sub populate (@) { return $tmob; } -sub localtime (;$) { populate CORE::localtime(shift||time)} -sub ctime (;$) { scalar CORE::localtime(shift||time) } +sub localtime (;$) { populate CORE::localtime(@_ ? shift : time)} +sub ctime (;$) { scalar CORE::localtime(@_ ? shift : time) } 1; -- cgit v1.2.1