SPVM::Time::Info - struct tm in C language
use Time::Info; my $tm = Time::Info->new; my $sec = $tm->tm_sec; $tm->set_tm_sec(12); my $min = $tm->tm_min; $tm->set_tm_min(34); my $hour = $tm->tm_hour; $tm->set_tm_hour(12); my $mday = $tm->tm_mday; $tm->set_tm_mday(4); my $mon = $tm->tm_mon; $tm->set_tm_mon(3); my $year = $tm->tm_year; $tm->set_tm_year(1); my $wday = $tm->tm_wday; $tm->set_tm_wday(12); my $yday = $tm->tm_yday; $tm->set_tm_yday(234); my $isdst = $tm->tm_isdst; $tm->set_tm_isdst(1);
Time::Info represents struct tm of C language.
Time::Info
struct tm
C language
See ctime(3) - Linux man page about struct tm in Linux.
static method new : Time::Info ();
Creates a new Time::Info object.
my $tm = Time::Info->new;
method tm_sec : int ();
Gets tm_sec.
tm_sec
my $tm_sec = $tm->tm_sec;
method set_tm_sec : void ($tm_sec : int);
Sets tm_sec.
$tm->set_tm_sec(12);
method tm_min : int ();
Gets tm_min.
tm_min
my $tm_min = $tm->tm_min;
method set_tm_min : void ($tm_min : int);
Sets tm_min.
$tm->set_tm_min(34);
method tm_hour : int ();
Gets tm_hour.
tm_hour
my $tm_hour = $tm->tm_hour;
method set_tm_hour : void ($tm_hour : int);
Sets tm_hour.
$tm->set_tm_hour(12);
method tm_mday : int ();
Gets tm_mday.
tm_mday
my $tm_mday = $tm->tm_mday;
method set_tm_mday : void ($tm_mday : int);
Sets tm_mday.
$tm->set_tm_mday(4);
method tm_mon : int ();
Gets tm_mon.
tm_mon
my $tm_mon = $tm->tm_mon;
method set_tm_mon : void ($tm_mon : int);
Sets tm_mon.
$tm->set_tm_mon(3);
method tm_year : int ();
Gets tm_year.
tm_year
my $tm_year = $tm->tm_year;
method set_tm_year : void ($tm_year : int);
Sets tm_year.
$tm->set_tm_year(1);
method tm_wday : int ();
Gets tm_wday.
tm_wday
my $tm_wday = $tm->tm_wday;
method set_tm_wday : void ($tm_wday : int);
Sets tm_wday.
$tm->set_tm_wday(12);
method tm_yday : int ();
Gets tm_yday.
tm_yday
my $yday = $tm->tm_yday;
method set_tm_yday : void ($tm_yday : int);
Sets tm_yday.
$tm->set_tm_yday(234);
method tm_isdst : int ();
Gets tm_isdst.
tm_isdst
my $isdst = $tm->tm_isdst;
method set_tm_isdst : void ($tm_isdst : int);
Sets tm_isdst.
$tm->set_tm_isdst(1);
The name of this module(Time::Info) should have been Sys::Time::Tm and this module should have belonged to Sys distribution.
Sys::Time::Tm
But Time::Info is already used by Time::Local and duplicate module management causes confusion, so Sys::Time::Tm is not created.
To install SPVM, copy and paste the appropriate command in to your terminal.
cpanm
cpanm SPVM
CPAN shell
perl -MCPAN -e shell install SPVM
For more information on module installation, please visit the detailed CPAN module installation guide.