summaryrefslogtreecommitdiff
path: root/lib/Time
diff options
context:
space:
mode:
authorChip Salzenberg <chip@atlantic.net>1997-04-30 00:00:00 +1200
committerChip Salzenberg <chip@atlantic.net>1997-04-30 00:00:00 +1200
commit03136e130d992186c97de0acd23f4857b1a277da (patch)
treed949f1f3a199a60e1e0ec5416f9118e7cd259f91 /lib/Time
parentcf26c822ca0e58de393c90b3f7a75af4335d0d65 (diff)
downloadperl-03136e130d992186c97de0acd23f4857b1a277da.tar.gz
Reset errno after failed piped close
(this is the same change as commit 00db273fa22ecba6466df777a772c6017c403a96, but as applied)
Diffstat (limited to 'lib/Time')
-rw-r--r--lib/Time/gmtime.pm7
-rw-r--r--lib/Time/localtime.pm7
2 files changed, 8 insertions, 6 deletions
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;