| 1 | package App::Pinto::Command::list; | ||||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||||
| 3 | # ABSTRACT: show the packages in a stack | ||||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||||
| 5 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 6 | 1 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 7 | |||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use Pinto::Util qw(interpolate); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | |||||||||||||||||||||||||||||
| 10 | #----------------------------------------------------------------------------- | ||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | 1 | ▶ | use base 'App::Pinto::Command'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||||
| 14 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 1 | our $VERSION = '0.14'; # VERSION | |||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | 0 | ▶ | sub command_names { return qw( list ls ) } | ||||||||||||||||||||||||||
|
Subroutine
command_names: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | 0 | ▶ | sub opt_spec { | ||||||||||||||||||||||||||
|
Subroutine
opt_spec: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||||||||||||
| 25 | 0 | my ( $self, $app ) = @_; | |||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||||
| 27 | return ( | ||||||||||||||||||||||||||||
| 28 | 0 | [ 'all|a' => 'List everything in the repository'], | |||||||||||||||||||||||||||
| 29 | [ 'authors|A=s' => 'Limit to matching author identities' ], | ||||||||||||||||||||||||||||
| 30 | [ 'distributions|D=s' => 'Limit to matching distribution names' ], | ||||||||||||||||||||||||||||
| 31 | [ 'packages|P=s' => 'Limit to matching package names' ], | ||||||||||||||||||||||||||||
| 32 | [ 'pinned!' => 'Limit to pinned packages (negatable)' ], | ||||||||||||||||||||||||||||
| 33 | [ 'format=s' => 'Format specification (See POD for details)' ], | ||||||||||||||||||||||||||||
| 34 | [ 'stack|s=s' => 'List contents of this stack' ], | ||||||||||||||||||||||||||||
| 35 | ); | ||||||||||||||||||||||||||||
| 36 | } | ||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||
| 38 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | 0 | ▶ | sub validate_args { | ||||||||||||||||||||||||||
|
Subroutine
validate_args: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||||||||||||||||||||
| 41 | 0 | my ( $self, $opts, $args ) = @_; | |||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | $self->usage_error('Multiple arguments are not allowed') | ||||||||||||||||||||||||||||
| 44 | 0 | ▶ | if @{$args} > 1; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | $opts->{format} = interpolate( $opts->{format} ) | ||||||||||||||||||||||||||||
| 47 | 0 | ▶ | if exists $opts->{format}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 48 | |||||||||||||||||||||||||||||
| 49 | 0 | ▶ | $opts->{stack} = $args->[0] | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 50 | if $args->[0]; | ||||||||||||||||||||||||||||
| 51 | |||||||||||||||||||||||||||||
| 52 | $self->usage_error('Cannot specify a stack when using --all') | ||||||||||||||||||||||||||||
| 53 | 0 | ▶ | if $opts->{stack} && $opts->{all}; | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$opts->{"stack"} and $opts->{"all"}
MC/DC0%0/2
$opts->{"stack"} and $opts->{"all"}
$opts->{"stack"}
$opts->{"all"}
Truth table0%0/3
A and B
A= $opts->{"stack"}B= $opts->{"all"}
| |||||||||||||||||||||||||||||
| 54 | |||||||||||||||||||||||||||||
| 55 | 0 | return 1; | |||||||||||||||||||||||||||
| 56 | } | ||||||||||||||||||||||||||||
| 57 | |||||||||||||||||||||||||||||
| 58 | #------------------------------------------------------------------------------ | ||||||||||||||||||||||||||||
| 59 | |||||||||||||||||||||||||||||
| 60 | 1 | 1; | |||||||||||||||||||||||||||
| 61 | |||||||||||||||||||||||||||||
| 62 | __END__ | ||||||||||||||||||||||||||||