File Coverage

blib/lib/App/RedisTop/Component/Time.pm
Criterion Covered Total %
statement 6 9 66.6
branch n/a
condition n/a
subroutine 2 4 50.0
pod 0 1 0.0
total 8 14 57.1


line stmt bran cond sub pod time code
1             package App::RedisTop::Component::Time;
2 1     1   786 use base 'App::RedisTop::Component';
  1         3  
  1         59  
3 1     1   815 use POSIX qw(strftime);
  1         6451  
  1         6  
4              
5             sub new {
6 0     0 0   my $class = shift;
7             my $self = bless {
8             group => 'date/time',
9             items => [
10 0     0     { name => 'time', data => sub { strftime("%m/%d %H:%M:%S", localtime()) }, },
11 0           ],
12             width => 15,
13             @_,
14             }, $class;
15             }
16              
17             1;