| 1 | package Thunderhorse::Config; | ||||||||||||||||||||
| 2 | 24 | $Thunderhorse::Config::VERSION = '0.107'; | |||||||||||||||||||
| 3 | 24 | ▶ | use v5.40; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 24 | ▶ | use Mooish::Base -standard; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | 24 | ▶ | use Path::Tiny qw(path); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 24 | extends 'Gears::Config'; | |||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 9 | ▶ | sub load_from_files ($self, $conf_dir, $env = undef) | ||||||||||||||||||
|
Subroutine
load_from_files: called CC=7 SCAR=19.5
Pod
documented
| |||||||||||||||||||||
| 11 | 9 | { | |||||||||||||||||||
| 12 | 9 | $conf_dir = path($conf_dir); | |||||||||||||||||||
| 13 | 9 | ▶ | return unless -d $conf_dir; | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 14 | |||||||||||||||||||||
| 15 | 8 | my @extensions = map { $_->handled_extensions } $self->readers->@*; | |||||||||||||||||||
| 16 | |||||||||||||||||||||
| 17 | 8 | ▶ | foreach my $base_name ('config', $env // ()) { | ||||||||||||||||||
|
Condition66%2/3
$env // ()
MC/DC0%0/2
$env // ()
$env
()
Truth table66%2/3
A // B
A= $envB= ()
| |||||||||||||||||||||
| 18 | 15 | foreach my $ext (@extensions) { | |||||||||||||||||||
| 19 | 18 | my $file = $conf_dir->child("$base_name.$ext"); | |||||||||||||||||||
| 20 | 18 | ▶ | $self->add(file => "$file") | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 21 | if -f $file; | ||||||||||||||||||||
| 22 | } | ||||||||||||||||||||
| 23 | } | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 8 | return; | |||||||||||||||||||
| 26 | } | ||||||||||||||||||||
| 27 | |||||||||||||||||||||
| 28 | __END__ | ||||||||||||||||||||