| 1 | package Dist::Conformance::Source::Directory 0.004; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: Standards read from a directory on this machine | ||||||||||
| 4 | |||||||||||
| 5 | 2 | ▶ | use 5.040; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 2 | ▶ | use warnings FATAL => 'all'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 2 | ▶ | use re '/aasx'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 2 | ▶ | use Mojo::Base 'Dist::Conformance::Source', -signatures; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 2 | ▶ | use Mojo::File(); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | |||||||||||
| 13 | 2 | has 'directory'; | |||||||||
| 14 | |||||||||||
| 15 | |||||||||||
| 16 | 0 | ▶ | sub new ( $class, @args ) { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 17 | 0 | my $self = $class->SUPER::new(@args); | |||||||||
| 18 | 0 | ▶ | die "directory is required\n" if !defined $self->directory; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | 0 | return $self; | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | |||||||||||
| 23 | 0 | ▶ | sub root ($self) { | ||||||||
|
Subroutine
root: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 24 | 0 | my $root = Mojo::File->new( $self->directory ); | |||||||||
| 25 | 0 | ▶ | die "The standards directory $root does not exist\n" if !-d $root; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | 0 | return $root; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | |||||||||||
| 30 | 0 | ▶ | sub describe ($self) { | ||||||||
|
Subroutine
describe: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 31 | 0 | ▶ | return $self->directory . ( $self->path ne q{} ? ' (path ' . $self->path . ')' : q{} ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 32 | } | ||||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||