File Coverage

blib/lib/Data/Rx/CoreType/def.pm
Criterion Covered Total %
statement 13 13 100.0
branch 2 2 100.0
condition n/a
subroutine 5 5 100.0
pod 0 2 0.0
total 20 22 90.9


line stmt bran cond sub pod time code
1 1     1   5 use strict;
  1         2  
  1         29  
2 1     1   5 use warnings;
  1         1  
  1         48  
3             package Data::Rx::CoreType::def;
4             # ABSTRACT: the Rx //def type
5             $Data::Rx::CoreType::def::VERSION = '0.200006';
6 1     1   4 use parent 'Data::Rx::CoreType';
  1         2  
  1         5  
7              
8             sub assert_valid {
9 99     99 0 25312 my ($self, $value) = @_;
10              
11 99 100       656 return 1 if defined $value;
12              
13 1         23 $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 54     54 0 202 sub subname { 'def' }
21              
22             1;
23              
24             __END__