earch;
use Moose 1.00;
use URI 1.54;
use URI::QueryParam;
use Carp;
use LWP::UserAgent 5.835;
use JSON 2.21;
use Bing::Search::Response;
use vars qw($VERSION);
$VERSION = "0.0005";
$VERSION = eval $V
: $!";
}
my $j = JSON->new->decode( $response->content );
$self->_parse_json( $j );
}
sub _parse_json {
# Debugging!
use Data::Dumper;
my( $self, $json ) = @_;
my $resp = Bin
g::Search::Response->new( data => $json );
$self->response( $resp );
}
sub _make_uri {
my ($self) = @_;
unless( $self->has_sources ) {
croak "No sources means no query, yo.";
}
peConstraints;
use JSON;
subtype 'Bing::Search::Response::Types::JSON'
=> as 'HashRef';
coerce 'Bing::Search::Response::Types::JSON'
=> from 'Str'
=> via { decode_json( $_ ) };
has 'dat
a' => (
is => 'rw',
coerce => 1,
isa => 'Bing::Search::Response::Types::JSON',
trigger => \&_parse
);
with 'Bing::Search::Role::Response::Version';
with 'Bing::Search::Role::Response::Qu
" or "Video" or so forth and so on.
=item C<data>
A hashref, it initially contains the deparsed JSON structure. As objects are
populated, it is depopulated. Anything left over is something Bing se