App-JobLog
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
lib/App/JobLog/Command/summary.pm view on Meta::CPAN
}
if ( $t2->{hour} < $t1->{hour}
|| $t2->{minute} < $t1->{minute}
|| $t2->{second} < $t1->{second} )
{
if ( $t2->{suffix} && $t2->{suffix} eq 'x' ) {
$t2->{hour} += 12;
}
else {
carp '"' . $time
. '" invalid time expression: endpoints out of order';
}
}
delete $t1->{suffix}, delete $t2->{suffix};
return { start => $t1, end => $t2 };
}
}
sub usage_desc { '%c ' . __PACKAGE__->name . ' %o [<date or date range>]' }
sub abstract {
lib/App/JobLog/Log.pm view on Meta::CPAN
sub all_events {
my ($self) = @_;
# reopen log in sequential reading mode
$self->[IO] = io log;
my ( @events, $previous );
while ( my $line = $self->[IO]->getline ) {
my $ll = App::JobLog::Log::Line->parse($line);
if ( $ll->is_endpoint ) {
$previous->end = $ll->time if $previous;
if ( $ll->is_beginning ) {
$previous = App::JobLog::Log::Event->new($ll);
push @events, $previous;
}
else {
$previous = undef;
}
}
}
lib/App/JobLog/Log/Line.pm view on Meta::CPAN
sub is_end { $_[0]->{done} }
sub is_note { $_[0]->{note} }
sub is_event { $_[0]->{time} }
sub is_endpoint { $_[0]->{time} && !$_[0]->{note} }
sub is_comment { exists $_[0]->{comment} }
sub tags_unspecified { $_[0]->{tags_unspecified} }
sub is_blank {
!( $_[0]->is_malformed || $_[0]->is_comment || $_[0]->is_event );
view all matches for this distributionview release on metacpan - search on metacpan
( run in 1.758 second using v1.00-cache-2.02-grep-82fe00e-cpan-4673cadbf75 )