Flute/Config.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 4 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 22 CC 1 SCAR 6.9
CC
1
Cov
0%
load
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Template::Flute::Config;
2  
3 use strict;
4 use warnings;
5  
6 use Config::Any;
7  
8 =head1 NAME
9  
10 Template::Flute::Config - Configuration file handling for Template::Flute
11  
12 =head1 FUNCTIONS
13  
14 =head2 load FILE
15  
16 Loads configuration file FILE with L<Config::Any>.
17  
18 =cut
19  
20 sub load {
21 my ($file) = @_;
22 my ($cf_any, $cf_file, $cf_struct);
23  
24 $cf_any = Config::Any->load_files({files => [$file], use_ext => 1});
25  
26 for (@$cf_any) {
27 ($cf_file, $cf_struct) = %$_;
28 }
29  
30 return $cf_struct;
31 }
32  
33 =head1 AUTHOR
34  
35 Stefan Hornburg (Racke), <racke@linuxia.de>
36  
37 =head1 LICENSE AND COPYRIGHT
38  
39 Copyright 2010-2016 Stefan Hornburg (Racke) <racke@linuxia.de>.
40  
41 This program is free software; you can redistribute it and/or modify it
42 under the terms of either: the GNU General Public License as published
43 by the Free Software Foundation; or the Artistic License.
44  
45 See http://dev.perl.org/licenses/ for more information.
46  
47 =cut
48  
49 1;