VFS/File.pm

filter: Statementstmt 38.8% 7 / 18 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 33.3% 2 / 6 Podpod 0.0% 0 / 4 totaltotal 30.0% 9 / 30 CC 2 SCAR 10.5
CC
2
Cov
35%
new
6.0
commit
2.0
read
2.0
CRAP 2.9
↑ Summary VFS/Filesystem.pm »
1 package VFS::File;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 0 ▶sub new {
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
7 0 my $class = shift;
8 0 ▶ my $self = ($#_ == 0) ? { %{ (shift) } } : { @_ };
Branch: 1 branch
BranchTrueFalseTotal
$#_ == 0 ? : 0 0 0
9 0 return bless $self, $class;
10 }
11  
12 0 ▶sub commit {
Subroutine commit: not called CC=1 SCAR=6.9
Pod undocumented
13 0 die "Commit called on basic file object - subclass this!";
14 }
15  
16 0 ▶sub read {
Subroutine read: not called CC=1 SCAR=6.9
Pod undocumented
17 0 my ($self) = @_;
18 0 return "";
19 }
20  
21 0 ▶sub write {
Subroutine write: not called CC=1 SCAR=6.9
Pod undocumented
22 0 my ($self, $data) = @_;
23 0 $self->{Data} = $data;
24 0 $self->commit; # Should update version.
25 0 return 1;
26 }
27  
28 1 1;
29 __END__
↑ Summary VFS/Filesystem.pm »