Statistics/R/IO/RDS.pm

filter: Statementstmt 100% 24 / 24 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 94.2% 33 / 35 CC 3 SCAR 5.7
CC
3
Cov
93%
read
3.1
BEGIN
1.0
BEGIN
1.0
CRAP 1.8
« Statistics/R/REXP/Character.pm ↑ Summary Statistics/R/REXP/Null.pm »
1 package Statistics::R::IO::RDS;
2 # ABSTRACT: Supply object methods for RDS files
3 1 $Statistics::R::IO::RDS::VERSION = '1.0002';
4 1 ▶use 5.010;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 1 ▶use Class::Tiny::Antlers;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 extends 'Statistics::R::IO::Base';
9  
10 1 ▶use Statistics::R::IO::REXPFactory;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 1 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 1 ▶use namespace::clean;
Subroutine BEGIN: called CC=1 SCAR=0.0
14  
15  
16 477 ▶sub read {
Subroutine read: called CC=3 SCAR=11.2
Pod documented
17 477 my $self = shift;
18
19 477 my $data = $self->_read_and_uncompress;
20
21 424 my ($value, $state) = @{Statistics::R::IO::REXPFactory::unserialize($data)};
22 424 ▶ croak 'Could not parse RDS file' unless $state;
Branch: 1 branch
BranchTrueFalseTotal
unless $state 0 424 424
23 424 ▶ croak 'Unread data remaining in the RDS file' unless $state->eof;
Branch: 1 branch
BranchTrueFalseTotal
unless $state->eof 0 424 424
24 424 $value
25 }
26  
27  
28 1 1;
29  
30 __END__
« Statistics/R/REXP/Character.pm ↑ Summary Statistics/R/REXP/Null.pm »