Class/File.pm

filter: Statementstmt 51.8% 14 / 27 Branchbran 0.0% 0 / 6 Conditioncond 0.0% 0 / 2 MC/DCmcdc 0.0% 0 / 1 Subroutinesub 66.6% 4 / 6 Podpod 100% 2 / 2 totaltotal 45.4% 20 / 44 CC 5 SCAR 22.6
CC
5
Cov
40%
new
20.0
dir
6.0
BEGIN
1.0
CRAP 9.6
« Class/Dir.pm ↑ Summary Class/Info.pm »
1 package SVN::Class::File;
2 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use base qw( Path::Class::File::Stat SVN::Class );
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use SVN::Class::Dir;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 3 our $VERSION = '0.18';
8  
9 # override Path::Class stuff to use SVN::Class instead
10 0 ▶sub new {
Subroutine new: not called CC=4 SCAR=30.0
Pod documented
11 0 my $self = Path::Class::Entity::new(shift);
12 0 my $file = pop();
13 0 my @dirs = @_;
14  
15 0 my ( $volume, $dirs, $base ) = $self->_spec->splitpath($file);
16  
17 0 ▶ if ( length $dirs ) {
Branch: 1 branch
BranchTrueFalseTotal
if (length $dirs) 0 0 0
18 0 push @dirs, $self->_spec->catpath( $volume, $dirs, '' );
19 }
20  
21 0 ▶ $self->{dir} = @dirs ? SVN::Class::Dir->new(@dirs) : undef;
Branch: 1 branch
BranchTrueFalseTotal
@dirs ? : 0 0 0
22 0 $self->{file} = $base;
23 0 ▶ $self->{svn} ||= 'svn';
Condition0%0/2
$self->{"svn"} ||= "svn"
l!l
00
MC/DC0%0/1
$self->{"svn"} ||= "svn"
$self->{"svn"}
Truth table0%0/2
A
A= $self->{"svn"}
Aresult
11
00
24  
25 0 return $self;
26 }
27  
28 0 ▶sub dir {
Subroutine dir: not called CC=2 SCAR=17.9
Pod documented
29 0 my $self = shift;
30 0 ▶ return $self->{dir} if defined $self->{dir};
Branch: 1 branch
BranchTrueFalseTotal
if defined $self->{"dir"} 0 0 0
31 0 return SVN::Class::Dir->new( $self->_spec->curdir );
32 }
33  
34 3 1;
35  
36 __END__
« Class/Dir.pm ↑ Summary Class/Info.pm »