App-jsonvalidate
view release on metacpan or search on metacpan
scripts/jsonvalidate view on Meta::CPAN
local $@;
eval
{
require LWP::UserAgent;
require HTTP::Request;
my $ua = LWP::UserAgent->new( timeout => 10 );
my $res = $ua->get( $url );
if( $res->is_success )
{
return( _decode_json_or_die( $res->decoded_content, $json, "$url: " ) );
}
bailout( "HTTP $url failed: " . $res->status_line );
}
or do
{
# No LWP or fetch failed; return undef so caller can try alternatives or die.
return;
};
}
( run in 0.532 second using v1.01-cache-2.11-cpan-9383018d099 )