package Time::localtime;
use strict;
+use 5.006_001;
+
use Time::tm;
-BEGIN {
+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(localtime ctime);
@EXPORT_OK = qw(
$tm_isdst
);
%EXPORT_TAGS = ( FIELDS => [ @EXPORT_OK, @EXPORT ] );
+ $VERSION = 1.02;
}
use vars @EXPORT_OK;
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;
Thus, C<$tm_obj-E<gt>mday()> corresponds to $tm_mday if you import
the fields.
-The ctime() funtion provides a way of getting at the
+The ctime() function provides a way of getting at the
scalar sense of the original CORE::localtime() function.
To access this functionality without the core overrides,
=head1 NOTE
-While this class is currently implemented using the Class::Template
+While this class is currently implemented using the Class::Struct
module to build a struct-like class, you shouldn't rely upon this.
=head1 AUTHOR