Skip to content

Commit

Permalink
fixed JSON module usage
Browse files Browse the repository at this point in the history
  • Loading branch information
sshAdm.in committed Mar 20, 2012
1 parent b46cf4d commit 8cba8f8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions snapback.pl
Expand Up @@ -6,7 +6,6 @@
print "Please install JSON module and make it available to current user.\n";
exit 1;
}
require JSON ;
JSON->import(qw(decode_json from_json));

my $script_name = "$0" ;
Expand Down Expand Up @@ -123,8 +122,8 @@
if ($debug) {
print "Response: " .$ec2DataResponse."\n";
}
my $instanceDataRef=decode_json $ec2DataResponse;
my $instanceDataText=from_json($ec2DataResponse, {utf8 => 1});
my $instanceDataRef=JSON->decode_json($ec2DataResponse);
my $instanceDataText=JSON->from_json($ec2DataResponse, {utf8 => 1});
my $instanceId=$instanceDataRef->{"instanceId"};
my $instanceRegion=$instanceDataRef->{"region"};
if ($debug) {
Expand Down

0 comments on commit 8cba8f8

Please sign in to comment.