| 1 | package Amazon::Credentials::Utils; | ||||||||||||||
| 2 | |||||||||||||||
| 3 | 20 | ▶ | use strict; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 4 | 20 | ▶ | use warnings; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 5 | |||||||||||||||
| 6 | 20 | ▶ | use parent qw(Exporter); | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 7 | |||||||||||||||
| 8 | 20 | our @EXPORT_OK = qw(choose); | |||||||||||||
| 9 | |||||||||||||||
| 10 | ######################################################################## | ||||||||||||||
| 11 | 202 | ▶ | sub choose(&) { ## no critic | ||||||||||||
|
Subroutine
choose: called CC=3 SCAR=11.8
Pod
undocumented
| |||||||||||||||
| 12 | ######################################################################## | ||||||||||||||
| 13 | 202 | my $code = shift; | |||||||||||||
| 14 | |||||||||||||||
| 15 | # Pass the correct context down to the block | ||||||||||||||
| 16 | 202 | ▶ | if (wantarray) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 17 | 8 | return $code->(); | |||||||||||||
| 18 | } | ||||||||||||||
| 19 | elsif ( defined wantarray ) { | ||||||||||||||
| 20 | 194 | return scalar $code->(); | |||||||||||||
| 21 | } | ||||||||||||||
| 22 | else { | ||||||||||||||
| 23 | 0 | $code->(); | |||||||||||||
| 24 | 0 | return; | |||||||||||||
| 25 | } | ||||||||||||||
| 26 | } | ||||||||||||||
| 27 | |||||||||||||||
| 28 | 20 | 1; | |||||||||||||