Hi,
I wrote a set of modules to deal with time in an object oriented
fashion. Example:
use Time::OO;
my $time = Time::OO->new();
$time->import(time());
$time->month->next(); # oh isn't this "becautiful" ;)
print $time->as_string("%d.%m.%Y %H:%M:%S\n"); # POSIX::strftime
A comparable module is Time-Objects, but that is more an OO interface
for localtime. Date::Calc also matches partly, but has no OO. A wrapper
to Date::Calc would also have been possible, but writing from scratch
seemed easier and more interesting to me.
I used a brute force method with massive amounts of simple perl code.
The modules are a year old now and I think they are more useful on CPAN
than on my hard disk. What do you think about the naming Time::OO? Or
better Time::YesItIsSlow aka Time::BetterHaveAFastProcessor? Or
Time::SteenkingOO? :)
Regards
-Winfried
OO.tar.gz