| 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
| |||||||||||||
| 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
| |||||||||||||
| 22 | 0 | $self->{file} = $base; | |||||||||||
| 23 | 0 | ▶ | $self->{svn} ||= 'svn'; | ||||||||||
|
Condition0%0/2
$self->{"svn"} ||= "svn"
MC/DC0%0/1
$self->{"svn"} ||= "svn"
$self->{"svn"}
Truth table0%0/2
A
A= $self->{"svn"}
| |||||||||||||
| 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
| |||||||||||||
| 31 | 0 | return SVN::Class::Dir->new( $self->_spec->curdir ); | |||||||||||
| 32 | } | ||||||||||||
| 33 | |||||||||||||
| 34 | 3 | 1; | |||||||||||
| 35 | |||||||||||||
| 36 | __END__ | ||||||||||||