package WWW::Metaweb;
use 5.008006;
use strict;
use warnings;
use JSON::XS;
use LWP::UserAgent;
use URI::Escape;
use HTTP::Request;
use Carp;
# debugging
use Data::Dumper;
our $VERSION = '0.02';
o
lread',
write_uri => '/api/service/mqlwrite',
trans_uri => '/api/trans',
pretty_json => 1 );
my $query = {
'/type/object/creator' => undef,
cover_appearances => [{
type
uery, 'json');
print $result;
The complicated way:
$mh->add_query('read', $query);
$mh->send_envelope('read')
or die $WWW::Metaweb::errstr;
my $result = $mh->result('read', 'json');
p
:JSONLikePerl;
use 5.008006;
use strict;
use warnings;
use Exporter;
our @ISA = qw(Exporter);
our @EXPORT = qw();
our @EXPORT_OK = qw(jsonlp_fetch jsonlp_replace jsonlp_insert jsonlp_quote jsonl
_TAGS = (standard => [qw(jsonlp_fetch jsonlp_replace jsonlp_insert jsonlp_quote jsonlp_unquote)]);
our $VERSION = 0.01;
=head1 NAME
WWW::Metaweb::JSONLikePerl - Access a JSON string like a Perl stru
cture
=head1 SYNOPSIS
use strict;
use WWW::Metaweb::JSONLikePerl qw(:standard);
my json = qq({
"cover_appearances": [
{
"part_of_series": "Runaways",