File Coverage

blib/lib/Statistics/R/REXP/EmptyEnvironment.pm
Criterion Covered Total %
statement 13 13 100.0
branch 6 6 100.0
condition n/a
subroutine 5 5 100.0
pod 1 2 50.0
total 25 26 96.1


line stmt bran cond sub pod time code
1             package Statistics::R::REXP::EmptyEnvironment;
2             # ABSTRACT: the empty R environment (C)
3             $Statistics::R::REXP::EmptyEnvironment::VERSION = '1.0';
4 12     12   17109 use 5.010;
  12         84  
5              
6 12     12   482 use Class::Tiny::Antlers;
  12         4458  
  12         59  
7 12     12   1379 use namespace::clean;
  12         10201  
  12         76  
8              
9             extends 'Statistics::R::REXP::Environment';
10              
11              
12             sub BUILD {
13 74     74 0 517 my ($self, $args) = @_;
14              
15             # Required attribute type
16 74 100       1025 die 'Empty environment has no attributes' if defined $self->attributes;
17 73 100       296 die 'Nothing can be assigned to the empty environment' if exists $args->{frame};
18 72 100       954 die 'Empty environment has no enclosure' if defined $self->enclosure;
19             }
20              
21              
22             sub name {
23 1     1 1 6 'R_EmptyEnv'
24             }
25              
26              
27             1; # End of Statistics::R::REXP::EmptyEnvironment
28              
29             __END__