File Coverage

blib/lib/Data/Rx/Type/Rx.pm
Criterion Covered Total %
statement 10 15 66.6
branch n/a
condition n/a
subroutine 5 7 71.4
pod 4 4 100.0
total 19 26 73.0


line stmt bran cond sub pod time code
1 1     1   6 use strict;
  1         1  
  1         42  
2 1     1   5 use warnings;
  1         101  
  1         60  
3             package Data::Rx::Type::Rx;
4             BEGIN {
5 1     1   225 $Data::Rx::Type::Rx::VERSION = '0.103520';
6             }
7             # ABSTRACT: an individual Rx type definition
8              
9              
10             sub new {
11 1     1 1 4 my ($class, %options) = @_;
12 1         5 bless \%options, $class;
13             }
14              
15              
16 1     1 1 21 sub type_uri { $_[0]->{type_uri} }
17              
18              
19             sub new_checker {
20 0     0 1   my ($self, $schema_arg, $rx) = @_;
21              
22 0           $self->{checker} = $rx->make_schema($self->{as});
23              
24 0           return $self;
25             }
26              
27              
28             sub check {
29 0     0 1   my ($self, $value) = @_;
30            
31 0           return $self->{checker}->check($value);
32             }
33              
34             1;
35              
36             __END__