File Coverage

blib/lib/Evo/Want.pm
Criterion Covered Total %
statement 21 21 100.0
branch 7 10 70.0
condition 2 3 66.6
subroutine 8 8 100.0
pod 0 3 0.0
total 38 45 84.4


line stmt bran cond sub pod time code
1             package Evo::Want;
2 2     2   698 use Evo '-Export *';
  2         4  
  2         14  
3 2     2   12 use Carp 'croak';
  2         4  
  2         96  
4             export qw(WANT_LIST WANT_SCALAR WANT_VOID want_is_list want_is_scalar want_is_void);
5              
6 2     2   13 use constant WANT_LIST => 1;
  2         4  
  2         141  
7 2     2   9 use constant WANT_SCALAR => '';
  2         4  
  2         71  
8 2     2   13 use constant WANT_VOID => undef;
  2         4  
  2         358  
9              
10             my $ERROR = "useless use";
11 5 50 66 5 0 18 sub want_is_list { croak $ERROR unless defined wantarray; defined $_[0] && $_[0] && $_[0] == 1; }
  5 100       39  
12 5 50   5 0 17 sub want_is_scalar { croak $ERROR unless defined wantarray; defined $_[0] && !$_[0] }
  5 100       30  
13 5 50   5 0 15 sub want_is_void { croak $ERROR unless defined wantarray; !defined $_[0] }
  5         23  
14              
15             1;
16              
17             __END__