Component/Component/Plaggerize/ConfigLoader.pm untested

filter: Statementstmt 0.0% 0 / 18 Branchbran 0.0% 0 / 2 Conditioncond 0.0% 0 / 7 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 35 CC 2 SCAR 12.8
CC
2
Cov
0%
setup_config
6.0
BEGIN
2.0
BEGIN
2.0
CRAP 3.6
1 package Class::Component::Component::Plaggerize::ConfigLoader;
2 use strict;
3 use warnings;
4  
5 use YAML ();
6  
7 sub setup_config {
8 my $class = shift;
9 my($config_file) = @_;
10  
11 my $config = $class->NEXT( setup_config => @_ );
12 $config_file = $config || $config_file || {};
13 return $config_file if ref($config_file);
14  
15 open my $fh, '<:utf8', $config_file or die $!;
16 $config = YAML::LoadFile($fh);
17 close $fh;
18  
19 $config;
20 }
21  
22 1;