:Format::json;
use Class::Easy;
use JSON;
sub new {
my $class = shift;
my $json = JSON->new;
$json->utf8 (1);
$json->pretty (1);
$json->convert_blessed (1);
bless {worker => $json}, $clas
o parse config file
my $serializer_json = $conf_package->serializer ('json');
if ($command =~ /^(?:--)?dump$/) {
print "\"$key\" => ";
print $serializer_json->dump_struct ($struct);
print "\
les
my $fixup_struct = {};
if ($command eq 'template') {
my $template = $serializer_json->parse_string (
$templates->{'template-' . $remains[0]}
);
eval "\$fixup_struct->$k
# TODO: store database config
$etc->append ("$project_id.json")->as_file->store_if_empty ('{}');
$etc->append ($instance, "$project_id.json")->as_file->store_if_empty ('{}');
$etc->append ('proj
};
use Class::Easy;
use base qw(Project::Easy);
has id => '{$project_id}';
has conf_format => 'json';
my $class = __PACKAGE__;
has entity_prefix => join '::', $class, 'Entity', '';
$class->init;
unning after kill, please kill manually\n";
exit;
}
}
$self->launch;
}
}
sub TO_JSON {
my $self = shift;
my $result = {map {$_ => $self->{$_}} keys %$self};
$result->{pid_file}
xpansion);
patch ($conf, $alt);
return $conf;
}
my $ext_syn = {
'pl' => 'perl',
'js' => 'json',
};
sub serializer {
shift;
my $type = shift;
$type = $ext_syn->{$type}
if exists $ext_s
y;
use base qw(Project::Easy);
has 'id', default => 'caramba';
has 'conf_format', default => 'json';
my $class = __PACKAGE__;
has 'entity_prefix', default => join '::', $class, 'Entity', '';