TaskForest::LocalTime - Module to provide local time. Can be made to return requested values during testing.
use TaskForest::LocalTime; my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = &LocalTime::localtime(); # # THE MONTH IS 1-BASED, AND THE YEAR IS THE FULL YEAR # (i.e., $mon++; $year += 1900; is not required) &LocalTime::setTime({ year => $year, month => $mon, day => $day, hour => $hour, min => $min, sec => $sec, tz => $tz }); # ... ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = &LocalTime::localtime(); # # THE MONTH IS 1-BASED, AND THE YEAR IS THE FULL YEAR # (i.e., $mon++; $year += 1900; is not required)
If you're just looking to use the taskforest application, the only documentation you need to read is that for TaskForest. You can do this either of the two ways:
perldoc TaskForest
OR
man TaskForest
This is a simple package that provides a location for the getLogDir function that's used in a few places.
Usage : &LocalTime::setTime({ year => $year, month => $mon, day => $day, hour => $hour, min => $min, sec => $sec, tz => $tz }); Purpose : This method 'sets' the current time to the time specified, in the timezone specified. Returns : Nothing Argument : A hash of values Throws : Nothing
Usage : &LocalTime::setTime({ year => $year, month => $mon, day => $day, hour => $hour, min => $min, sec => $sec, tz => $tz }); my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = &LocalTime::lt(); Purpose : This method returns the localtime or the time that was previously set with setTime. Time set with setTime will advance. Returns : Nothing Argument : A hash of values Throws : Nothing
To install TaskForest, copy and paste the appropriate command in to your terminal.
cpanm
cpanm TaskForest
CPAN shell
perl -MCPAN -e shell install TaskForest
For more information on module installation, please visit the detailed CPAN module installation guide.