| 1 | 5 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 2 | 5 | ▶ | use warnings; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 3 | |||||||||||||||||||||
| 4 | package Footprintless::App::Action; | ||||||||||||||||||||
| 5 | 5 | $Footprintless::App::Action::VERSION = '1.29'; | |||||||||||||||||||
| 6 | # ABSTRACT: A base class for actions | ||||||||||||||||||||
| 7 | # PODNAME: Footprintless::App::Action | ||||||||||||||||||||
| 8 | |||||||||||||||||||||
| 9 | 5 | ▶ | use parent qw(App::Cmd::ArgProcessor); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 10 | |||||||||||||||||||||
| 11 | 5 | ▶ | use Footprintless::App -ignore; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 12 | 5 | ▶ | use Log::Any; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 5 | my $logger = Log::Any->get_logger(); | |||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | 8 | ▶ | sub _new { | ||||||||||||||||||
|
Subroutine
_new: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 17 | 8 | my ( $class, $self ) = @_; | |||||||||||||||||||
| 18 | 8 | return bless( $self, $class ); | |||||||||||||||||||
| 19 | } | ||||||||||||||||||||
| 20 | |||||||||||||||||||||
| 21 | 0 | ▶ | sub abstract { | ||||||||||||||||||
|
Subroutine
abstract: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 22 | 0 | my ($self_or_class) = @_; | |||||||||||||||||||
| 23 | |||||||||||||||||||||
| 24 | 0 | require Footprintless::App::DocumentationUtil; | |||||||||||||||||||
| 25 | 0 | return Footprintless::App::DocumentationUtil::abstract($self_or_class); | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | 0 | ▶ | sub description { | ||||||||||||||||||
|
Subroutine
description: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||
| 29 | 0 | my ($self_or_class) = @_; | |||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 0 | require Footprintless::App::DocumentationUtil; | |||||||||||||||||||
| 32 | 0 | ▶ | my $description = Footprintless::App::DocumentationUtil::description($self_or_class) | ||||||||||||||||||
|
Condition0%0/3
Footprintless::App::DocumentationUtil::description($self_or_class) || ucfirst $self_or_class->abstract
MC/DC0%0/2
Footprintless::App::DocumentationUtil::description($self_or_class) || ucfirst $self_or_class->abstract
Footprintless::App::DocumentationUtil::description($self_or_class)
ucfirst $self_or_class->abstract
Truth table0%0/3
A || B
A= Footprintless::App::DocumentationUtil::description($self_or_class)B= ucfirst $self_or_class->abstract
| |||||||||||||||||||||
| 33 | || ucfirst( $self_or_class->abstract() ); | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | 0 | ▶ | if ( scalar( $self_or_class->opt_spec() ) ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 36 | 0 | $description .= "\n\nAvailable options:\n"; | |||||||||||||||||||
| 37 | } | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 0 | return $description; | |||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 8 | ▶ | sub prepare { | ||||||||||||||||||
|
Subroutine
prepare: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 43 | 8 | my ( $class, $app, $footprintless, $coordinate, @args ) = @_; | |||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 8 | my ( $opts, $remaining_args, %fields ) = | |||||||||||||||||||
| 46 | $class->_process_args( \@args, $class->usage_desc(), $class->opt_spec() ); | ||||||||||||||||||||
| 47 | |||||||||||||||||||||
| 48 | return ( | ||||||||||||||||||||
| 49 | 8 | $class->_new( | |||||||||||||||||||
| 50 | { app => $app, | ||||||||||||||||||||
| 51 | footprintless => $footprintless, | ||||||||||||||||||||
| 52 | coordinate => $coordinate, | ||||||||||||||||||||
| 53 | %fields | ||||||||||||||||||||
| 54 | } | ||||||||||||||||||||
| 55 | ), | ||||||||||||||||||||
| 56 | $opts, | ||||||||||||||||||||
| 57 | $remaining_args | ||||||||||||||||||||
| 58 | ); | ||||||||||||||||||||
| 59 | } | ||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | 3 | ▶ | sub opt_spec { | ||||||||||||||||||
|
Subroutine
opt_spec: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 62 | 3 | return (); | |||||||||||||||||||
| 63 | } | ||||||||||||||||||||
| 64 | |||||||||||||||||||||
| 65 | 0 | ▶ | sub usage { | ||||||||||||||||||
|
Subroutine
usage: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 66 | 0 | return $_[0]->{usage}; | |||||||||||||||||||
| 67 | } | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | 0 | ▶ | sub usage_error { | ||||||||||||||||||
|
Subroutine
usage_error: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||
| 70 | 0 | my ( $self, $message, $coordinate ) = @_; | |||||||||||||||||||
| 71 | 0 | require Footprintless::App::UsageException; | |||||||||||||||||||
| 72 | 0 | die( Footprintless::App::UsageException->new( $message, $coordinate ) ); | |||||||||||||||||||
| 73 | } | ||||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | 0 | ▶ | sub validate_args { } | ||||||||||||||||||
|
Subroutine
validate_args: not called CC=1 SCAR=0.0
Pod
documented
| |||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | 5 | 1; | |||||||||||||||||||
| 78 | |||||||||||||||||||||
| 79 | __END__ | ||||||||||||||||||||