File::Stat::OO is an object-oriented interface for accessing file status attributes.
SYNOPSIS
use File::Stat::OO;
my $foo = File::Stat::OO->new({file => '/etc/password'});
$foo->stat; # stat file specified at instantiation time
print $foo->size;
print $foo->mtime; # modification time in epoch seconds
or inflate epoch seconds into DateTime objects
my $foo = File::Stat::OO->new();
$foo->use_datetime(1);
# Or the two lines above can be combined as
# my $foo = File::Stat::OO->new({use_datetime => 1});
$foo->stat('/etc/password'); # pass file name to the stat method
print $foo->mtime; # returns DateTime object not an epoch
print $foo->mtime->epoch; # epoch seconds
Product's homepage
Requirements:
· Perl