App-Prolix
view release on metacpan or search on metacpan
lib/App/Prolix.pm view on Meta::CPAN
my $fh = IO::File->new($filename, "w") or die "open: $filename: $!";
$self->_log($fh);
}
sub close_log {
my($self) = @_;
$self->_log->close if $self->_log;
}
# Like: (DateTime->new->iso8601 =~ s/[-:]//g), but I didn't want to add
# a big dependency.
sub now_stamp {
my($self) = @_;
my(@t) = localtime; # Should this be gmtime?
return sprintf "%4d%02d%02dT%02d%02d%02d",
$t[5] + 1900, $t[4] + 1, $t[3], $t[2], $t[1], $t[0]; # Ahh, UNIX.
}
sub stats {
( run in 0.336 second using v1.01-cache-2.11-cpan-05444aca049 )