if ($format =~ /json/) {
$r->content_type($ctype or $format);
- $output= sub { print to_json({
+ $output= sub { print to_json_shim({
success => 1,
show => length $canontext ? encode_entities($canontext)
: ' ',
})};
- $output_wrong= sub { print to_json({
+ $output_wrong= sub { print to_json_shim({
success => 0,
show => $_[0],
})};
if (!$results) {
if (!%m) {
return $err->('no island or arch matches "%s"');
- } elsif (%m > 5) {
+ } elsif (keys(%m) > 5) {
return $err->(' ');
} else {
return $err->('ambiguous island or arch "%s",'.