Update Percona::WebAPI::Representation in pt-agent so the previous commit actually works.

This commit is contained in:
Daniel Nichter
2013-01-31 17:50:57 -07:00
parent 3b64102f17
commit f99b1dee70

View File

@@ -714,9 +714,14 @@ sub as_json {
$json->allow_blessed([]);
$json->convert_blessed([]);
return $json->encode(
my $text = $json->encode(
ref $resource eq 'ARRAY' ? $resource : as_hashref($resource, %args)
);
if ( $args{json} && $text ) { # for testing
chomp($text);
$text .= "\n";
}
return $text;
}
sub as_config {