| 1 | # ABSTRACT: Report distributions that are missing | ||||||||||
| 2 | |||||||||||
| 3 | package Pinto::Action::Verify; | ||||||||||
| 4 | |||||||||||
| 5 | 1 | ▶ | use Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 1 | ▶ | use MooseX::StrictConstructor; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 1 | ▶ | use MooseX::MarkAsMethods ( autoclean => 1 ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use Pinto::Util qw(throw); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | #------------------------------------------------------------------------------ | ||||||||||
| 12 | |||||||||||
| 13 | 1 | our $VERSION = '0.14'; # VERSION | |||||||||
| 14 | |||||||||||
| 15 | #------------------------------------------------------------------------------ | ||||||||||
| 16 | |||||||||||
| 17 | 1 | extends qw( Pinto::Action ); | |||||||||
| 18 | |||||||||||
| 19 | #------------------------------------------------------------------------------ | ||||||||||
| 20 | |||||||||||
| 21 | 0 | ▶ | sub execute { | ||||||||
|
Subroutine
execute: not called CC=4 SCAR=30.0
Pod
undocumented
| |||||||||||
| 22 | 0 | my ($self) = @_; | |||||||||
| 23 | |||||||||||
| 24 | 0 | my $dist_rs = $self->repo->db->schema->distribution_rs; | |||||||||
| 25 | |||||||||||
| 26 | 0 | my $missing = 0; | |||||||||
| 27 | 0 | ▶ | while ( my $dist = $dist_rs->next ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 28 | |||||||||||
| 29 | 0 | ▶ | if ( not -e $dist->native_path ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 30 | 0 | $self->error("Missing distribution $dist"); | |||||||||
| 31 | 0 | $missing++; | |||||||||
| 32 | } | ||||||||||
| 33 | } | ||||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | throw("$missing archives are missing") if $missing; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 36 | |||||||||||
| 37 | 0 | return $self->result; | |||||||||
| 38 | } | ||||||||||
| 39 | |||||||||||
| 40 | #------------------------------------------------------------------------------ | ||||||||||
| 41 | |||||||||||
| 42 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 43 | |||||||||||
| 44 | #------------------------------------------------------------------------------ | ||||||||||
| 45 | |||||||||||
| 46 | 1 | 1; | |||||||||
| 47 | |||||||||||
| 48 | __END__ | ||||||||||