ts;
if (ref $hosts eq 'CODE') {
return $hosts->();
}
return $hosts;
}
sub TO_JSON {
my $self = shift;
return {
name => $self->name,
hosts => $self->get_hos
oading file: %s", $@ || $!);
}
}
sub dump_config {
my $self = shift;
require JSON;
print JSON->new->pretty->utf8->allow_blessed(1)->convert_blessed(1)->encode({
config =>