| 1 | # ABSTRACT: App::Spec objects representing command line option specs | ||||||||||||
| 2 | 10 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 3 | 10 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | package App::Spec::Option; | ||||||||||||
| 5 | |||||||||||||
| 6 | 10 | our $VERSION = 'v0.15.1'; # TRIAL VERSION | |||||||||||
| 7 | |||||||||||||
| 8 | 10 | ▶ | use base 'App::Spec::Argument'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 9 | 10 | ▶ | use Moo; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 10 | |||||||||||||
| 11 | 10 | has aliases => ( is => 'ro' ); | |||||||||||
| 12 | |||||||||||||
| 13 | 622 | ▶ | sub build { | ||||||||||
|
Subroutine
build: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||
| 14 | 622 | my ($class, %args) = @_; | |||||||||||
| 15 | 622 | my %hash = $class->common(%args); | |||||||||||
| 16 | my $self = $class->new({ | ||||||||||||
| 17 | 622 | ▶ | aliases => $args{aliases} || [], | ||||||||||
|
Condition100%2/2
$args{'aliases'} || []
MC/DC100%1/1
$args{'aliases'} || []
$args{'aliases'}
Truth table100%2/2
A
A= $args{'aliases'}
| |||||||||||||
| 18 | %hash, | ||||||||||||
| 19 | }); | ||||||||||||
| 20 | 622 | return $self; | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 10 | 1; | |||||||||||
| 24 | |||||||||||||
| 25 | =pod | ||||||||||||
| 26 | |||||||||||||
| 27 | =head1 NAME | ||||||||||||
| 28 | |||||||||||||
| 29 | App::Spec::Option - App::Spec objects representing command line option specs | ||||||||||||
| 30 | |||||||||||||
| 31 | =head1 SYNOPSIS | ||||||||||||
| 32 | |||||||||||||
| 33 | This class inherits from L<App::Spec::Argument> | ||||||||||||
| 34 | |||||||||||||
| 35 | =head1 METHODS | ||||||||||||
| 36 | |||||||||||||
| 37 | =over 4 | ||||||||||||
| 38 | |||||||||||||
| 39 | =item build | ||||||||||||
| 40 | |||||||||||||
| 41 | my $option = App::Spec::Option->build( | ||||||||||||
| 42 | name => 'verbose', | ||||||||||||
| 43 | summary => 'lala', | ||||||||||||
| 44 | aliases => ['v'], | ||||||||||||
| 45 | ); | ||||||||||||
| 46 | |||||||||||||
| 47 | =item aliases | ||||||||||||
| 48 | |||||||||||||
| 49 | Attribute which represents the one from the spec. | ||||||||||||
| 50 | |||||||||||||
| 51 | =back | ||||||||||||
| 52 | |||||||||||||
| 53 | =cut | ||||||||||||