ION = "1.02";
use Class::Load qw(load_class);
use Crypt::OpenSSL::PKCS12;
use JSON qw(decode_json encode_json);
use JSON::WebToken;
use LWP::UserAgent;
sub create {
my (%args) = @_;
my $version
>{private_key_file} =~ /\.json$/) {
open my $in, "<", $self->{private_key_file} or die "can't open $self->{private_key_file} : $!";
my $private_key_json = decode_json(join('', <$in>));
clo
se $in;
$self->{private_key} = $private_key_json->{private_key};
} elsif ($self->{private_key_file} =~ /\.p12$/) {
my $password = "notasecret";
my $pkcs12 = Crypt::OpenSSL::PKCS12->new_f
1;
use strict;
use warnings;
use base qw(Google::BigQuery);
use HTTP::Request;
use JSON qw(decode_json encode_json);
use URI::Escape;
sub new {
my ($class, %args) = @_;
my $self = $class->SUPE
:POST|PUT|PATCH)$/) {
$request->header('Content-Type' => 'application/json');
$request->content(encode_json($args{content}));
}
} else {
my $upload_path = $rest_descrip
d_part(
HTTP::Message->new(
['Content-Type' => 'application/json; charset=UTF-8'],
encode_json($args{content})
)
);
my $data;
open my $in, "<", $