ARGV-JSON
view release on metacpan or search on metacpan
t/01_argv.t view on Meta::CPAN
use strict;
use warnings;
use Test::More;
use File::Spec;
use File::Basename;
BEGIN {
@ARGV = File::Spec->catfile(dirname(__FILE__), 'data', '01.json')
}
use ARGV::JSON;
is_deeply [ @ARGV::JSON::Data ], [
{
'bar' => {
'baz' => undef
},
'foo' => [
1,
2,
3
]
},
[
'x',
'y',
'z'
],
{}
];
is_deeply scalar <>, {
foo => [1,2,3],
bar => { baz => undef },
};
is_deeply [ <> ], [
[ 'x', 'y', 'z' ],
{},
];
is scalar <>, undef;
done_testing;
( run in 0.598 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )