File Coverage

blib/lib/Kelp/Module/Config/YAML.pm
Criterion Covered Total %
statement 8 8 100.0
branch n/a
condition n/a
subroutine 3 3 100.0
pod 1 1 100.0
total 12 12 100.0


line stmt bran cond sub pod time code
1             package Kelp::Module::Config::YAML;
2              
3 1     1   444344 use Kelp::Base 'Kelp::Module::Config';
  1         3  
  1         9  
4 1     1   26869 use YAML::PP qw(LoadFile);
  1         74329  
  1         134  
5              
6             our $VERSION = '1.00';
7              
8             attr ext => 'yml';
9              
10             sub load {
11 2     2 1 14910 my ( $self, $filename ) = @_;
12 2         6 LoadFile($filename);
13             }
14              
15             1;
16              
17             __END__
18              
19             =pod
20              
21             =head1 NAME
22              
23             Kelp::Module::Config::YAML - YAML config files for your Kelp app
24              
25             =head1 SYNOPSIS
26              
27             # app.psgi
28             use MyApp;
29              
30             my $app = MyApp->new( config_module => 'Config::YAML' );
31             $app->run;
32              
33             =head1 DESCRIPTION
34              
35             Works exactly the same as L<Kelp::Module::Config>, but loads configuration from
36             YAML files with C<.yml> extension.
37              
38             =head1 SEE ALSO
39              
40             L<Kelp>
41              
42             L<Kelp::Module>
43              
44             L<Kelp::Module::Config>
45              
46             L<YAML::PP>
47              
48             =head1 AUTHOR
49              
50             Stefan Geneshky minimal@cpan.org
51              
52             =head1 LICENSE
53              
54             Perl
55              
56             =cut
57