| 1 | package MooX::Cmd::Role::ConfigFromFile; | ||||||||||
| 2 | # ABSTRACT: MooX::ConfigFromFile support role for MooX::Cmd | ||||||||||
| 3 | 2 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 2 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 2 | our $VERSION = '1.001'; | |||||||||
| 6 | |||||||||||
| 7 | 2 | ▶ | use Moo::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | |||||||||||
| 10 | 2 | requires "config_prefixes"; | |||||||||
| 11 | |||||||||||
| 12 | 12 | ▶ | around _build_config_prefixes => sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 13 | 12 | my $next = shift; | |||||||||
| 14 | 12 | my $class = shift; | |||||||||
| 15 | 12 | my $params = shift; | |||||||||
| 16 | 12 | my $cfg_pfxs = $class->$next($params, @_); | |||||||||
| 17 | |||||||||||
| 18 | ref $params->{command_chain} eq "ARRAY" | ||||||||||
| 19 | 12 | and push @{$cfg_pfxs}, | |||||||||
| 20 | 12 | ▶ | grep { defined $_ } map { $_->command_name } grep { $_->can("command_name") } @{$params->{command_chain}}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 21 | |||||||||||
| 22 | 12 | return $cfg_pfxs; | |||||||||
| 23 | 2 | }; | |||||||||
| 24 | |||||||||||
| 25 | 2 | 1; | |||||||||
| 26 | |||||||||||
| 27 | __END__ | ||||||||||