| 1 | package Tapper::CLI::Base; | ||||||||||
| 2 | 1 | our $AUTHORITY = 'cpan:TAPPER'; | |||||||||
| 3 | 1 | $Tapper::CLI::Base::VERSION = '5.0.8'; | |||||||||
| 4 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | |||||||||||
| 8 | 0 | ▶ | sub b_print_help { | ||||||||
|
Subroutine
b_print_help: not called CC=6 SCAR=37.4
Pod
documented
| |||||||||||
| 9 | |||||||||||
| 10 | 0 | my ( $ar_help_array ) = @_; | |||||||||
| 11 | |||||||||||
| 12 | 0 | my @a_params; | |||||||||
| 13 | 0 | my $i_param_length = 0; | |||||||||
| 14 | 0 | for my $ar_parameter ( @{$ar_help_array} ) { | |||||||||
| 15 | 0 | push @a_params, '--' . (split /=|:|!/, $ar_parameter->[0])[0]; | |||||||||
| 16 | 0 | ▶ | if ( length $a_params[-1] > $i_param_length ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 17 | 0 | $i_param_length = length $a_params[-1]; | |||||||||
| 18 | } | ||||||||||
| 19 | } | ||||||||||
| 20 | 0 | my $i_counter = 0; | |||||||||
| 21 | 0 | for my $ar_parameter ( @{$ar_help_array} ) { | |||||||||
| 22 | 0 | printf {*STDERR} ' %s%' . ($i_param_length-length($a_params[$i_counter])) . "s %s\n", $a_params[$i_counter], '', $ar_help_array->[$i_counter][1]; | |||||||||
| 23 | 0 | ▶ | if ( @{$ar_parameter} > 2 ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 24 | 0 | for my $i_sub_counter ( 2..$#{$ar_parameter} ) { | |||||||||
| 25 | 0 | printf {*STDERR} ' %' . $i_param_length . "s %s\n", '', $ar_help_array->[$i_counter][$i_sub_counter]; | |||||||||
| 26 | } | ||||||||||
| 27 | } | ||||||||||
| 28 | 0 | $i_counter++; | |||||||||
| 29 | } | ||||||||||
| 30 | |||||||||||
| 31 | 0 | print {*STDERR} "\n"; | |||||||||
| 32 | |||||||||||
| 33 | 0 | return 1; | |||||||||
| 34 | |||||||||||
| 35 | } | ||||||||||
| 36 | |||||||||||
| 37 | 1 | 1; | |||||||||
| 38 | |||||||||||
| 39 | __END__ | ||||||||||