| 1 | package Dist::Conformance::Check::DistFiles 0.006; | ||||||||||
| 2 | |||||||||||
| 3 | # ABSTRACT: A distribution has the files that its build needs | ||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use 5.040; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use warnings FATAL => 'all'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use re '/aasx'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | 1 | ▶ | use Mojo::Base 'Dist::Conformance::Check::ToolConfiguration', -signatures; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | 1 | ▶ | use Dist::Conformance::Schema(); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | |||||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | sub config_schema ($class) { | ||||||||
|
Subroutine
config_schema: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 14 | 0 | my $schema = $class->SUPER::config_schema; | |||||||||
| 15 | return { | ||||||||||
| 16 | 0 | required => [ 'marker', @{ $schema->{required} } ], | |||||||||
| 17 | properties => { | ||||||||||
| 18 | 0 | %{ $schema->{properties} }, | |||||||||
| 19 | marker => $Dist::Conformance::Schema::PATH, | ||||||||||
| 20 | absent => { %$Dist::Conformance::Schema::STATUS, default => 'info' }, | ||||||||||
| 21 | }, | ||||||||||
| 22 | }; | ||||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | |||||||||||
| 26 | 0 | ▶ | sub check ( $self, $snapshot ) { | ||||||||
|
Subroutine
check: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 27 | 0 | my $marker = $self->config->{marker}; | |||||||||
| 28 | 0 | ▶ | return ( $self->config->{absent}, "no $marker" ) if !$snapshot->contains($marker); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 29 | 0 | return $self->SUPER::check($snapshot); | |||||||||
| 30 | } | ||||||||||
| 31 | |||||||||||
| 32 | |||||||||||
| 33 | 0 | ▶ | sub update ( $self, $update ) { | ||||||||
|
Subroutine
update: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 34 | 0 | ▶ | return if !$update->snapshot->contains( $self->config->{marker} ); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 35 | 0 | return $self->SUPER::update($update); | |||||||||
| 36 | } | ||||||||||
| 37 | |||||||||||
| 38 | __END__ | ||||||||||