Re: [perl #46011] [RESOLVED] overload "0+" doesn't handle integer results
[p5sagit/p5-mst-13.2.git] / lib / Time / gmtime.pm
index c1d11d7..eb5b371 100644 (file)
@@ -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 $VERSION);
     @ISA         = qw(Exporter Time::tm);
     @EXPORT      = qw(gmtime gmctime);
     @EXPORT_OK   = qw(  
@@ -13,7 +15,7 @@ BEGIN {
                        $tm_isdst
                    );
     %EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] );
-    $VERSION     = 1.01;
+    $VERSION     = 1.03;
 }
 use vars      @EXPORT_OK;
 
@@ -43,11 +45,12 @@ Time::gmtime - by-name interface to Perl's built-in gmtime() function
  use Time::gmtime;
  $gm = gmtime();
  printf "The day in Greenwich is %s\n", 
-    (qw(Sun Mon Tue Wed Thu Fri Sat Sun))[ gm->wday() ];
+    (qw(Sun Mon Tue Wed Thu Fri Sat Sun))[ $gm->wday() ];
 
- use Time::gmtime w(:FIELDS;
+ use Time::gmtime qw(:FIELDS);
+ gmtime();
  printf "The day in Greenwich is %s\n", 
-    (qw(Sun Mon Tue Wed Thu Fri Sat Sun))[ gm_wday() ];
+    (qw(Sun Mon Tue Wed Thu Fri Sat Sun))[ $tm_wday ];
 
  $now = gmctime();
 
@@ -69,7 +72,7 @@ still overrides your core functions.)  Access these fields as variables
 named with a preceding C<tm_> in front their method names.  Thus,
 C<$tm_obj-E<gt>mday()> 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,