ata dump of JSON structure";
say " Will use Data::Peek if available,";
say " otherwise Data::Dumper";
say " -j --json Dump as json";
say
" -J --json-pp Dump as json (formatted)";
say " -Q --json-jq Dump as json (formatted by jq)";
say " -c --csv Dump as CSV (NYI)";
exit $err;
} # usage
use Net::CV
E;
use Data::Peek;
use Data::Dumper;
use JSON::MaybeXS;
use List::Util qw( first );
use Getopt::Long qw(:config bundling);
GetOptions (
"help|?" => sub { usage (0); },
"V|version"
ge Net::CVE;
use 5.014002;
use warnings;
our $VERSION = "0.009";
use Carp;
use HTTP::Tiny;
use JSON::MaybeXS;
use List::Util qw( first );
# https://cveawg.mitre.org/api/cve/CVE-2022-26928
# But th
get",
source => $url,
usage => undef,
};
return $self;
}
$self->{data} = decode_json ($r->{content});
}
elsif (-s $cve) {
my $fh;
unless (open $fh, "<:encoding(utf-8)", $cve)
"get",
source => $cve,
usage => 'get ("cve-2022-26928.json")',
};
return $self;
}
unless (eval { $self->{data} = decode_json (do { local $/; <$fh> }); 1 }) {
$self->{diag} = {