File Coverage

blib/lib/Data/Rx/CoreType/def.pm
Criterion Covered Total %
statement 12 12 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 19 21 90.4


line stmt bran cond sub pod time code
1 1     1   11 use v5.12.0;
  1         3  
2 1     1   5 use warnings;
  1         1  
  1         38  
3             package Data::Rx::CoreType::def 0.200008;
4             # ABSTRACT: the Rx //def type
5              
6 1     1   5 use parent 'Data::Rx::CoreType';
  1         2  
  1         5  
7              
8             sub assert_valid {
9 99     99 0 20295 my ($self, $value) = @_;
10              
11 99 100       290 return 1 if defined $value;
12              
13 1         11 $self->fail({
14             error => [ qw(type) ],
15             message => "found value is undef",
16             value => $value, # silly, but let's be consistent -- rjbs, 2009-04-17
17             });
18             }
19              
20 70     70 0 197 sub subname { 'def' }
21              
22             1;
23              
24             __END__