or stringify, format: 'json'||'yaml'
$conf->parse(format => '{"k":"v"}')
$string = $conf->stringify('format')
# save or load, format (may be ommitted): 'auto'||'json'||'yaml'
$conf->l
e('k.v')
=head1 DESCRIPTION
Flexconf is base for configuration management
=cut
use Flexconf::Json;
use Flexconf::Yaml;
sub new {
my ($package, $data) = @_;
my $self = bless {data => $data},
f::Json' if 'json' eq $type;
return 'Flexconf::Yaml' if 'yaml' eq $type;
die 'wrong conf format'
}
sub type_by_filename {
my ($self, $filename) = @_;
return 'json' if $filename =~ /\.json$/;