e JSON::XS qw(decode_json);
use Time::HiRes;
use Try::Tiny;
our $VERSION = '0.07';
my @file_types = ({
type => 'json',
re => qr{\.json$},
parser => sub {
my ($filename) = @_;
my $json;
$filename) =~ /(.*)/s; # untaint
try {
$json = decode_json(encode('UTF-8', $1));
} catch {
warning "couldn't parse json file ($filename): $_\n";
};
} catch {
warning "couldn't find file to parse ($filename): $_\n";
};
return $json;
},
});
my $dynamic_config;
register dynamic_config => sub {
my ($file_key) = @_;
initialize() unless $dynam
e JSON::XS qw(decode_json);
use Time::HiRes;
use Try::Tiny;
our $VERSION = '0.07';
my @file_types = ({
type => 'json',
re => qr{\.json$},
parser => sub {
my ($filename) = @_;
my $json;
$filename) =~ /(.*)/s; # untaint
try {
$json = decode_json(encode('UTF-8', $1));
} catch {
warning "couldn't parse json file ($filename): $_\n";
};
} catch {
warning "couldn't find file to parse ($filename): $_\n";
};
return $json;
},
});
my $dynamic_config;
register dynamic_config => sub {
my ($file_key) = @_;
initialize() unless $dynam