File Coverage

blib/lib/Whelk/Schema/Definition/Null.pm
Criterion Covered Total %
statement 6 10 60.0
branch 2 2 100.0
condition n/a
subroutine 3 4 75.0
pod 3 3 100.0
total 14 19 73.6


line stmt bran cond sub pod time code
1             package Whelk::Schema::Definition::Null;
2             $Whelk::Schema::Definition::Null::VERSION = '1.04';
3 3     3   2948 use Whelk::StrictBase 'Whelk::Schema::Definition';
  3         7  
  3         28  
4              
5             sub openapi_dump
6             {
7 0     0 1 0 my ($self, $openapi_obj, %hints) = @_;
8              
9 0         0 my $res = $self->SUPER::openapi_dump($openapi_obj, %hints);
10 0         0 $res->{type} = 'null';
11              
12 0         0 return $res;
13             }
14              
15             sub inhale
16             {
17 6 100   6 1 33 return 'null' unless !defined pop();
18 3         9 return undef;
19             }
20              
21             sub exhale
22             {
23 3     3 1 21 return undef;
24             }
25              
26             1;
27