Branch Coverage

blib/lib/App/Maisha/Shell.pm
Criterion Covered Total %
branch 39 210 18.5


line true false branch
83 0 2 unless ($plug)
85 1 1 unless %plugins
87 0 2 unless ($plugin)
93 0 2 unless ($status)
118 0 0 unless ($plug)
140 0 0 if (my $p = $self->_get_plugin($plug)) { }
208 0 1 if $user
209 1 0 unless ($user)
218 0 0 if $ret->{'screen_name'}
219 0 0 if $ret->{'name'}
220 0 0 if $ret->{'location'}
221 0 0 if $ret->{'description'}
222 0 0 if $ret->{'url'}
223 0 0 if $ret->{'friends_count'}
224 0 0 if $ret->{'followers_count'}
225 0 0 if $ret->{'statuses_count'}
226 0 0 if $ret->{'status'}{'text'}
243 0 0 unless $service and $service->can('users')
257 0 1 if $user
258 1 0 unless ($user)
280 0 1 if $user
281 1 0 unless ($user)
350 0 2 if $user
351 2 0 unless ($user)
402 0 2 @_ && $_[0] =~ /^from|to$/ ? :
411 0 2 if $max_id
412 0 2 if $count
417 0 2 if ($@ || !$ret and $self->error =~ /This application is not allowed to access or delete your direct messages/)
420 0 0 unless $ret
424 0 0 if $@
427 2 0 unless $ret
428 0 0 if $max_id and $max_id == $ret->[-1]{'id'}
433 2 0 unless @pages
437 0 0 $frto eq 'to' ? :
460 3 0 unless ($self->line)
467 0 0 if $user
468 0 0 unless ($user)
473 0 0 unless (defined $mess and $mess =~ /\S/)
481 0 0 if ($len > 140)
518 2 0 unless ($self->line)
527 0 0 unless ($text)
533 0 0 if ($len < 140) { }
0 0 elsif ($len > 140) { }
535 0 0 if $text =~ /\S/
536 0 0 if length "$text$tag" <= 140
572 0 0 if ($text =~ /^(\d+)\s+(.*)/)
576 0 0 unless ($text)
582 0 0 if ($len > 1000)
669 1 0 if (not $state) { }
0 0 elsif ($state eq 'on') { }
0 0 elsif ($state eq 'off') { }
706 0 0 if $handler and $$handler =~ /^(comp|help|smry)_/
707 0 0 if $cmd and $$cmd =~ /^(q|quit)$/
716 0 0 if ($file and -f $file)
717 0 0 unless my $fh = 'IO::File'->new($file, 'r')
720 0 0 unless $_
729 0 0 if (my $file = $self->history)
730 0 0 if $_
731 0 0 if (@history)
733 0 0 unless my $fh = 'IO::File'->new($file, 'w+')
734 0 0 if @history > 100
752 2 1 $first ? :
763 63 75 if (@_)
774 0 2 if ($pages) { }
777 0 0 if $max_id
778 0 0 if $count
782 0 0 unless $ret
783 0 0 if $max_id and $max_id == $ret->[-1]{'id'}
790 0 2 if $ret
793 2 0 unless @pages
805 0 0 if ($pages) { }
808 0 0 if $max_id
809 0 0 if $count
813 0 0 unless $ret
814 0 0 if $max_id and $max_id == $ret->[-1]{'id'}
821 0 0 if $ret
824 0 0 unless @pages
840 0 6 if $user
841 0 6 if $max_id
842 0 6 if $count
846 6 0 unless $ret
847 0 0 if $max_id and $max_id == $ret->[-1]{'id'}
852 6 0 unless @pages
866 10 0 unless defined $services and @$services
869 0 0 unless defined $service
875 0 0 if ($@) { }
0 0 elsif (not $ret) { }
876 0 0 $self->debug ? :
894 0 0 unless defined $services and @$services
897 0 0 unless defined $service
906 0 0 if ($@) { }
0 0 elsif (not $ret) { }
907 0 0 $self->debug ? :
924 0 0 $self->order =~ /^asc/i ? :
925 0 0 if $limit and $limit < scalar @recs
932 0 0 if ($self->pager) { }
948 0 0 unless $M
954 0 0 if ($who) { }
977 10 0 unless $limit
979 0 0 unless $limit =~ /^\d+$/
980 0 0 if $limit > $max->{'limit'}
983 0 0 if $limit <= $count
985 0 0 $limit % $count ? :
995 3 1 unless $class eq 'Base'
1001 0 2 unless my $class = shift()