X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FTime%2Fgmtime.pm;h=4e1359b36d90d618239800462dc85fc4fcabe8d3;hb=b22259aae2830e67de6b1589bf23d712d55a0341;hp=7ca12bb981ba57287f904741e1f945127cc5ed37;hpb=8cc95fdbe3687330bd987cea170494b4cd263d90;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Time/gmtime.pm b/lib/Time/gmtime.pm index 7ca12bb..4e1359b 100644 --- a/lib/Time/gmtime.pm +++ b/lib/Time/gmtime.pm @@ -1,10 +1,12 @@ package Time::gmtime; use strict; +use 5.006_001; + use Time::tm; +our(@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS, $VERSION); BEGIN { use Exporter (); - use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); @ISA = qw(Exporter Time::tm); @EXPORT = qw(gmtime gmctime); @EXPORT_OK = qw( @@ -13,6 +15,7 @@ BEGIN { $tm_isdst ); %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] ); + $VERSION = 1.02; } use vars @EXPORT_OK; @@ -27,8 +30,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__ @@ -68,7 +71,7 @@ still overrides your core functions.) Access these fields as variables named with a preceding C in front their method names. Thus, C<$tm_obj-Emday()> corresponds to $tm_mday if you import the fields. -The gmctime() funtion provides a way of getting at the +The gmctime() function provides a way of getting at the scalar sense of the original CORE::gmtime() function. To access this functionality without the core overrides,