File Coverage

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


line stmt bran cond sub pod time code
1             package Evo::Want;
2 2     2   747 use Evo '-Export *';
  2         4  
  2         22  
3 2     2   16 use Carp 'croak';
  2         6  
  2         145  
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         5  
  2         168  
7 2     2   17 use constant WANT_SCALAR => '';
  2         10  
  2         111  
8 2     2   13 use constant WANT_VOID => undef;
  2         5  
  2         460  
9              
10             my $ERROR = "useless use";
11 5 50 100 5 0 23 sub want_is_list { croak $ERROR unless defined wantarray; defined $_[0] && $_[0] && $_[0] == 1; }
  5 100       45  
12 5 50   5 0 20 sub want_is_scalar { croak $ERROR unless defined wantarray; defined $_[0] && !$_[0] }
  5 100       31  
13 5 50   5 0 19 sub want_is_void { croak $ERROR unless defined wantarray; !defined $_[0] }
  5         24  
14              
15             1;
16              
17             __END__