On 04/08/2014 04:21 PM, Morse, Richard E.MGH wrote:
I just discovered an odd bug, and felt that I had to let people know.

It used to be that the following worked:

        use File::Slurp qw/slurp/;
        use JSON;

        my $data = decode_json( slurp('file.json') );


subs usually provide list context. that sub probably had a prototype of a scalar argument.


Since some recent update to the JSON module, you have to use:

        my $data = decode_json( scalar( slurp('file.json') ) );

bet they dropped the prototype or changed it to allow multiple arguments.

can you compare the versions and see if my conjecture is correct?

thanx,

uri
--
Uri Guttman - The Perl Hunter
The Best Perl Jobs, The Best Perl Hackers
http://PerlHunter.com

_______________________________________________
Boston-pm mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to