File Coverage

blib/lib/Statistics/R/REXP/Null.pm
Criterion Covered Total %
statement 20 20 100.0
branch 2 2 100.0
condition n/a
subroutine 9 9 100.0
pod 2 3 66.6
total 33 34 97.0


line stmt bran cond sub pod time code
1             package Statistics::R::REXP::Null;
2             # ABSTRACT: the R null object
3             $Statistics::R::REXP::Null::VERSION = '1.0';
4 13     13   16204 use 5.010;
  13         28  
5              
6 13     13   473 use Class::Tiny::Antlers;
  13         3974  
  13         61  
7 13     13   1478 use namespace::clean;
  13         9549  
  13         52  
8              
9             extends 'Statistics::R::REXP';
10              
11              
12 13     13   1418 use constant sexptype => 'NILSXP';
  13         17  
  13         1269  
13              
14             sub BUILDARGS {
15 990     990 0 154966 my $class = shift;
16 990 100       1986 die 'Null cannot have attributes' if scalar @_;
17              
18 989         1786 return {@_}
19             }
20              
21             sub is_null {
22 518     518 1 1693 return 1;
23             }
24              
25             use overload
26 13     13   923 '""' => sub { 'NULL' };
  13     10   685  
  13         80  
  10         114  
27              
28             sub to_pl {
29             undef
30 1     1 1 412 }
31              
32              
33             1; # End of Statistics::R::REXP::Null
34              
35             __END__