| 1 | package Parse::ExuberantCTags::Merge::SimpleScopeGuard; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 2 | ▶ | use 5.006001; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 2 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 2 | our $VERSION = '1.00'; | |||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | use Class::XSAccessor | ||||||||||||||||||||||||||||
| 10 | 2 | ▶ | constructor => 'new', | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | accessors => { | ||||||||||||||||||||||||||||
| 12 | files => 'files', | ||||||||||||||||||||||||||||
| 13 | 2 | }; | |||||||||||||||||||||||||||
| 14 | |||||||||||||||||||||||||||||
| 15 | 0 | ▶ | sub add_files { | ||||||||||||||||||||||||||
|
Subroutine
add_files: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||
| 16 | 0 | my $self = shift; | |||||||||||||||||||||||||||
| 17 | 0 | ▶ | my $files = $self->files || []; | ||||||||||||||||||||||||||
|
Condition0%0/2
$self->files || []
MC/DC0%0/1
$self->files || []
$self->files
Truth table0%0/2
A
A= $self->files
| |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | 0 | push @$files, @_; | |||||||||||||||||||||||||||
| 20 | 0 | $self->files($files); | |||||||||||||||||||||||||||
| 21 | 0 | return(1); | |||||||||||||||||||||||||||
| 22 | } | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 11 | ▶ | sub cleanup { | ||||||||||||||||||||||||||
|
Subroutine
cleanup: called CC=5 SCAR=17.2
Pod
documented
| |||||||||||||||||||||||||||||
| 25 | 11 | my $self = shift; | |||||||||||||||||||||||||||
| 26 | 11 | ▶ | foreach my $file ( @{$self->files || []} ) { | ||||||||||||||||||||||||||
|
Condition50%1/2
$self->files || []
MC/DC0%0/1
$self->files || []
$self->files
Truth table50%1/2
A
A= $self->files
| |||||||||||||||||||||||||||||
| 27 | 2 | ▶ | if (defined $file and -f $file) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
defined $file and -f $file
MC/DC0%0/2
defined $file and -f $file
defined $file
-f $file
Truth table33%1/3
A and B
A= defined $fileB= -f $file
| |||||||||||||||||||||||||||||
| 28 | 2 | unlink $file; | |||||||||||||||||||||||||||
| 29 | } | ||||||||||||||||||||||||||||
| 30 | } | ||||||||||||||||||||||||||||
| 31 | 11 | $self->files([]); | |||||||||||||||||||||||||||
| 32 | 11 | return(); | |||||||||||||||||||||||||||
| 33 | } | ||||||||||||||||||||||||||||
| 34 | |||||||||||||||||||||||||||||
| 35 | 11 | ▶ | sub DESTROY { | ||||||||||||||||||||||||||
|
Subroutine
DESTROY: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 36 | 11 | my $self = shift; | |||||||||||||||||||||||||||
| 37 | 11 | $self->cleanup; | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 2 | 1; | |||||||||||||||||||||||||||
| 41 | __END__ | ||||||||||||||||||||||||||||