| 1 | package MooX::Cmd::Role::ConfigFromFile; | ||||||||||
| 2 | |||||||||||
| 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 | |||||||||||
| 6 | 2 | our $VERSION = "0.016_001"; | |||||||||
| 7 | |||||||||||
| 8 | 2 | ▶ | use Moo::Role; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | |||||||||||
| 10 | =head1 NAME | ||||||||||
| 11 | |||||||||||
| 12 | MooX::Cmd::Role::ConfigFromFile - MooX::ConfigFromFile support role for MooX::Cmd | ||||||||||
| 13 | |||||||||||
| 14 | =cut | ||||||||||
| 15 | |||||||||||
| 16 | 2 | requires "config_prefixes"; | |||||||||
| 17 | |||||||||||
| 18 | around _build_config_prefixes => sub { | ||||||||||
| 19 | 9 | ▶ | my $next = shift; | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=6.9
| |||||||||||
| 20 | 9 | my $class = shift; | |||||||||
| 21 | 9 | my $params = shift; | |||||||||
| 22 | 9 | my $cfg_pfxs = $class->$next($params, @_); | |||||||||
| 23 | |||||||||||
| 24 | ref $params->{command_chain} eq "ARRAY" | ||||||||||
| 25 | 9 | and push @{$cfg_pfxs}, | |||||||||
| 26 | 9 | ▶ | grep { defined $_ } map { $_->command_name } grep { $_->can("command_name") } @{$params->{command_chain}}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 27 | |||||||||||
| 28 | 9 | return $cfg_pfxs; | |||||||||
| 29 | 2 | }; | |||||||||
| 30 | |||||||||||
| 31 | =head1 LICENSE AND COPYRIGHT | ||||||||||
| 32 | |||||||||||
| 33 | Copyright 2015-2017 Jens Rehsack. | ||||||||||
| 34 | |||||||||||
| 35 | This program is free software; you can redistribute it and/or modify it | ||||||||||
| 36 | under the terms of either: the GNU General Public License as published | ||||||||||
| 37 | by the Free Software Foundation; or the Artistic License. | ||||||||||
| 38 | |||||||||||
| 39 | See L<http://dev.perl.org/licenses/> for more information. | ||||||||||
| 40 | |||||||||||
| 41 | =cut | ||||||||||
| 42 | |||||||||||
| 43 | 2 | 1; | |||||||||