ARGV-JSON
view release on metacpan or search on metacpan
Build.PL
Changes
LICENSE
META.json
README.md
cpanfile
lib/ARGV/JSON.pm
minil.toml
t/00_compile.t
t/01_argv.t
t/data/01.json
META.yml
MANIFEST
# $_ is a decoded JSON here!
}
Or in one-liner:
perl -MARGV::JSON -anal -E 'say $_->{foo}->{bar}' a.json b.json
# DESCRIPTION
ARGV::JSON parses each input from `@ARGV` and enables to access
the JSON data structures via `<>`.
Each `readline` call to `<>` (or `<ARGV>`) returns a
hashref or arrayref or something that the input serializes in the
JSON format.
# SEE ALSO
[ARGV::URL](https://metacpan.org/pod/ARGV::URL).
# LICENSE
lib/ARGV/JSON.pm view on Meta::CPAN
# $_ is a decoded JSON here!
}
Or in one-liner:
perl -MARGV::JSON -anal -E 'say $_->{foo}->{bar}' a.json b.json
=head1 DESCRIPTION
ARGV::JSON parses each input from C<< @ARGV >> and enables to access
the JSON data structures via C<< <> >>.
Each C<< readline >> call to C<< <> >> (or C<< <ARGV> >>) returns a
hashref or arrayref or something that the input serializes in the
JSON format.
=head1 SEE ALSO
L<ARGV::URL>.
=head1 LICENSE
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' => [
( run in 0.383 second using v1.01-cache-2.11-cpan-8d75d55dd25 )