Permalink
Browse files

call: allow array arguments too; don't assume json when { is in the m…

…iddle of an argument
  • Loading branch information...
1 parent fbae3c2 commit 783d2f6968a2080a22e05a47a6bd6508ed1714e6 @ysth ysth committed Apr 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 call.pl
View
@@ -14,6 +14,6 @@
) or die "$0 --config=foo.json\n";
my $client = Client->new(config => $config_name);
-my @args = map { $_ =~ /\{/ ? decode_json($_) : $_ } @ARGV;
+my @args = map { $_ =~ /^[[{]/ ? decode_json($_) : $_ } @ARGV;
my $result = $client->call(@args);
print JSON::PP->new->allow_nonref->canonical->pretty->encode($result);

0 comments on commit 783d2f6

Please sign in to comment.