Bot-BasicBot-Pluggable-Module-Crontab
view release on metacpan or search on metacpan
lib/Bot/BasicBot/Pluggable/Module/Crontab.pm view on Meta::CPAN
#############################################################################
# Private Methods #
#############################################################################
sub _load_cron {
my $self = shift;
my $fn = $self->store->get( 'crontab', 'file' ) or return 0;
return 0 unless(-r $fn); # file must be readable
my $mod = (stat($fn))[9];
return 1 if($mod <= $load_time); # don't reload if not modified
@crontab = ();
my $fh = IO::File->new($fn,'r') or die "Cannot load file [$fn]: $!\n";
while(<$fh>) {
s/\s+$//;
my $line = $_;
next unless($line);
( run in 1.170 second using v1.01-cache-2.11-cpan-49f99fa48dc )