| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package EPublisher::Config; | 
| 2 |  |  |  |  |  |  |  | 
| 3 |  |  |  |  |  |  | # ABSTRACT: Config module for EPublisher | 
| 4 | 8 |  |  | 8 |  | 65593 | use strict; | 
|  | 8 |  |  |  |  | 25 |  | 
|  | 8 |  |  |  |  | 222 |  | 
| 5 | 8 |  |  | 8 |  | 41 | use warnings; | 
|  | 8 |  |  |  |  | 15 |  | 
|  | 8 |  |  |  |  | 175 |  | 
| 6 | 8 |  |  | 8 |  | 36 | use Carp; | 
|  | 8 |  |  |  |  | 29 |  | 
|  | 8 |  |  |  |  | 467 |  | 
| 7 | 8 |  |  | 8 |  | 4342 | use YAML::Tiny; | 
|  | 8 |  |  |  |  | 44646 |  | 
|  | 8 |  |  |  |  | 1081 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | our $VERSION = 0.01; | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  | sub get_config{ | 
| 12 | 6 |  |  | 6 | 1 | 2309 | my ($class,$file) = @_; | 
| 13 |  |  |  |  |  |  |  | 
| 14 | 6 | 100 | 100 |  |  | 530 | croak "No (existant) config file given!" unless defined $file and -e $file; | 
| 15 | 4 |  |  |  |  | 26 | my $config = YAML::Tiny->read( $file )->[0]; | 
| 16 |  |  |  |  |  |  |  | 
| 17 | 4 |  |  |  |  | 27171 | return $config; | 
| 18 |  |  |  |  |  |  | } | 
| 19 |  |  |  |  |  |  |  | 
| 20 |  |  |  |  |  |  | 1; | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | __END__ |