Subject: | extra ";" when using "when" word on hashs. |
Hello,
Here's the sample.
input:
use strict;
use JSON;
my $ref = {
when => time(),
message => 'abc'
};
my $json = encode_json {
when => time(),
message => 'abc'
};
my $json2 = encode_json +{
when => time(),
message => 'abc'
};
output:
use strict;
use JSON;
my $ref = {
when => time(),
message => 'abc'
};
my $json = encode_json {
when => time(),
message => 'abc';
};
my $json2 = encode_json + {
when => time(),
message => 'abc'
};
-----
As you all can see, using +{ } solves, so, it's not that critic, if the people knew about it, but it's important, because it broken the script!
Thank you all!