| 1 | package Test::XTFiles; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | 3 | ▶ | use 5.006; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | 3 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 5 | 3 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | 3 | our $VERSION = '0.001'; | |||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||||
| 9 | 3 | ▶ | use Class::Tiny 1; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||
| 11 | 3 | ▶ | use XT::Files; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | # | ||||||||||||||||||||||||||||
| 14 | # CLASS METHODS | ||||||||||||||||||||||||||||
| 15 | # | ||||||||||||||||||||||||||||
| 16 | |||||||||||||||||||||||||||||
| 17 | sub BUILD { | ||||||||||||||||||||||||||||
| 18 | 2 | ▶ | my ( $self, $args ) = @_; | ||||||||||||||||||||||||||
|
Subroutine
BUILD: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 2 | @{ $self->{_files} } = XT::Files->instance->files; | |||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | 2 | return; | |||||||||||||||||||||||||||
| 23 | } | ||||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||||
| 25 | # | ||||||||||||||||||||||||||||
| 26 | # OBJECT METHODS | ||||||||||||||||||||||||||||
| 27 | # | ||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||
| 29 | sub all_executable_files { | ||||||||||||||||||||||||||||
| 30 | 2 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
all_executable_files: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | 2 | my @files = map { $_->name } grep { $_->is_script } $self->files; | |||||||||||||||||||||||||||
| 33 | 2 | return @files; | |||||||||||||||||||||||||||
| 34 | } | ||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||
| 36 | sub all_files { | ||||||||||||||||||||||||||||
| 37 | 2 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
all_files: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | 2 | my @files = map { $_->name } $self->files; | |||||||||||||||||||||||||||
| 40 | 2 | return @files; | |||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | sub all_module_files { | ||||||||||||||||||||||||||||
| 44 | 2 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
all_module_files: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | 2 | my @files = map { $_->name } grep { $_->is_module } $self->files; | |||||||||||||||||||||||||||
| 47 | 2 | return @files; | |||||||||||||||||||||||||||
| 48 | } | ||||||||||||||||||||||||||||
| 49 | |||||||||||||||||||||||||||||
| 50 | sub all_perl_files { | ||||||||||||||||||||||||||||
| 51 | 2 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
all_perl_files: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||||
| 52 | |||||||||||||||||||||||||||||
| 53 | 2 | ▶ | my @files = map { $_->name } grep { $_->is_script || $_->is_module || $_->is_test } $self->files; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition100%3/3
$_->is_script or $_->is_module
MC/DC100%2/2
$_->is_script or $_->is_module
$_->is_script
$_->is_module
Truth table100%3/3
A or B
A= $_->is_scriptB= $_->is_module
| |||||||||||||||||||||||||||||
| 54 | 2 | return @files; | |||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | sub all_pod_files { | ||||||||||||||||||||||||||||
| 58 | 2 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
all_pod_files: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | 2 | my @files = map { $_->name } grep { $_->is_pod } $self->files; | |||||||||||||||||||||||||||
| 61 | 2 | return @files; | |||||||||||||||||||||||||||
| 62 | } | ||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||
| 64 | sub all_test_files { | ||||||||||||||||||||||||||||
| 65 | 2 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
all_test_files: called CC=1 SCAR=0.1
Pod
documented
| |||||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||||
| 67 | 2 | my @files = map { $_->name } grep { $_->is_test } $self->files; | |||||||||||||||||||||||||||
| 68 | 2 | return @files; | |||||||||||||||||||||||||||
| 69 | } | ||||||||||||||||||||||||||||
| 70 | |||||||||||||||||||||||||||||
| 71 | sub files { | ||||||||||||||||||||||||||||
| 72 | 14 | ▶ | my ($self) = @_; | ||||||||||||||||||||||||||
|
Subroutine
files: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||||
| 74 | 14 | my @files = sort @{ $self->{_files} }; | |||||||||||||||||||||||||||
| 75 | 14 | return @files; | |||||||||||||||||||||||||||
| 76 | } | ||||||||||||||||||||||||||||
| 77 | |||||||||||||||||||||||||||||
| 78 | 3 | 1; | |||||||||||||||||||||||||||
| 79 | |||||||||||||||||||||||||||||
| 80 | __END__ | ||||||||||||||||||||||||||||