File Coverage

blib/lib/Whelk/Config.pm
Criterion Covered Total %
statement 5 5 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod 1 1 100.0
total 8 8 100.0


line stmt bran cond sub pod time code
1             package Whelk::Config;
2             $Whelk::Config::VERSION = '1.04';
3 18     18   3551252 use Kelp::Base 'Kelp::Module::Config';
  18         86  
  18         154  
4              
5             attr data => sub {
6             my $self = shift;
7             return $self->merge(
8             $self->SUPER::data,
9             {
10             modules => [qw(JSON YAML Whelk)],
11             modules_init => {
12             Routes => {
13             base => 'Whelk::Resource',
14             rebless => 1,
15             fatal => 1,
16             },
17              
18             JSON => {
19             utf8 => 0, # will not encode wide characters
20             },
21              
22             YAML => {
23             kelp_extensions => 1,
24             boolean => 'perl,JSON::PP',
25             },
26             },
27              
28             persistent_controllers => 1,
29              
30             encoders => {
31             json => {
32             openapi => {
33             pretty => 1,
34             canonical => 1,
35             },
36             },
37             },
38             }
39             );
40             };
41              
42             sub process_mode
43             {
44 38     38 1 61935 my ($self, $mode) = @_;
45              
46 38         229 return $self->SUPER::process_mode("whelk_$mode");
47             }
48              
49             1;
50