view release on metacpan or search on metacpan
lib/App/RoboBot/Plugin/API/Github.pm view on Meta::CPAN
return unless $response->is_success;
my $json;
eval {
$json = decode_json($response->decoded_content);
};
return if $@;
return $json;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Scheme79asm.pm view on Meta::CPAN
Print the length of the memory (as a big-endian 16-bit value),
followed by the memory contents as a sequence of big-endian 16-bit
values to the given filehandle (default STDOUT). Dies if
C<addr_bits + type_bits> is more than 16.
Big-endian 16-bit values can be decoded with C<unpack 'n', $value>.
=item $asm->B<print_verilog>([I<$fh>])
Print a block of Verilog code assigning the memory contents to an
array named C<mem> to the given filehandle (default STDOUT).
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Slackeria/Plugin/Debian.pm view on Meta::CPAN
}
$self->{conf}->{href} //= 'http://packages.debian.org/sid/%s';
my $href = sprintf( $self->{conf}->{href}, $self->{conf}->{name} );
my $html = $reply->decoded_content();
my $tree = XML::LibXML->load_html(
string => $html,
recover => 2,
suppress_errors => 1,
suppress_warnings => 1,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Slaughter/Transport/http.pm view on Meta::CPAN
my $response = $ua->request($req);
if ( $response->is_success() )
{
$self->{ 'verbose' } &&
print "\tOK\n";
return ( $response->decoded_content() );
}
#
# Failed?
#
view all matches for this distribution
view release on metacpan or search on metacpan
socialcalc/Changes.txt view on Meta::CPAN
2008-11-06:
Added calcorder as a timesliced part of recalc.
2008-11-07:
Added recalc to coded and decoded sheet attributes.
Sheet recalc attribute is now followed, as well as new sheet.recalconce.
2008-11-10:
SpreadsheetControl now has a default status line.
Added recalc button to toolbar.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/SpreadRevolutionaryDate/BlueskyLite.pm view on Meta::CPAN
$blob_req->header('Content-Type' => $img_response->header('Content-Type'));
$blob_req->content($img_response->content);
my $blob_response = $self->{ua}->request($blob_req);
return unless $blob_response->is_success;
my $blob_content = decode_json($blob_response->decoded_content);
($card->{thumb}) = $blob_content->{blob};
}
return $card;
}
lib/App/SpreadRevolutionaryDate/BlueskyLite.pm view on Meta::CPAN
my $uri = URI->new('https://bsky.social/xrpc/com.atproto.identity.resolveHandle');
$uri->query_form(handle => $account);
my $response = $self->{ua}->get($uri);
return if !$response->is_success;
my $content = decode_json($response->decoded_content);
return $content->{did};
}
sub _generate_facets {
my $self = shift;
lib/App/SpreadRevolutionaryDate/BlueskyLite.pm view on Meta::CPAN
$req->header('Content-Type' => 'application/json');
$req->content($json);
my $response = $self{ua}->request($req);
if ($response->is_success) {
my $content = decode_json($response->decoded_content);
my $did = $content->{did};
my $access_jwt = $content->{accessJwt};
$self{ua}->default_header('Authorization' => 'Bearer ' . $access_jwt);
$self{did} = $did;
}
lib/App/SpreadRevolutionaryDate/BlueskyLite.pm view on Meta::CPAN
$blob_req->header('Content-Type' => $mime_type);
$blob_req->content($img_bytes);
my $blob_response = $self->{ua}->request($blob_req);
return unless $blob_response->is_success;
my $blob_content = decode_json($blob_response->decoded_content);
$payload->{record}->{embed} = {
'$type' => 'app.bsky.embed.images',
images => [
{
alt => $img_alt,
lib/App/SpreadRevolutionaryDate/BlueskyLite.pm view on Meta::CPAN
my $req = HTTP::Request->new('POST', 'https://bsky.social/xrpc/com.atproto.repo.createRecord');
$req->header('Content-Type' => 'application/json');
$req->content($json);
my $response = $self->{ua}->request($req);
if ($response->is_success) {
return decode_json($response->decoded_content);
} else {
return $response;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
0.9992 2015-05-20T23:51:41Z
- On PostgreSQL, Sqitch now sets the `client_encoding` parameter to
`UTF8` for its own connection to the database. This ensures that data
sent to and from the database should always be properly encoded and
decoded. Users should still set the proper encodings for change scripts
as appropriate.
- Fixed test failures due to path differences on Windows.
- DateTime::TimeZone is now explicitly required in an attempt to head off
"Cannot determine local time zone" errors.
- Corrected some typos and thinkos in `sqitchtutorial-oracle`, thanks to
view all matches for this distribution
view release on metacpan or search on metacpan
local/lib/perl5/YAML/Tiny.pm view on Meta::CPAN
=head2 read_string $string;
The C<read_string> constructor reads YAML data from a character string, and
returns a new C<YAML::Tiny> object containing the parsed content. If you have
read the string from a file yourself, be sure that you have correctly decoded
it into characters first.
Returns the object on success or throws an error on failure.
=head2 write $filename
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/TimeTracker/Proto.pm view on Meta::CPAN
sub _build_config_file_locations {
my $self = shift;
my $file = $self->home->file('projects.json');
if ( -e $file && -s $file ) {
my $decoded_json;
try {
$decoded_json = decode_json( $file->slurp );
}
catch {
error_message( "Could not json decode '%s'.\nError: '%s'", $file, $_ );
exit 1;
};
return $decoded_json;
}
else {
return {};
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Twitch.pm view on Meta::CPAN
my $event = $request_packet->[1];
my $response = $response_packet->[0];
eval {
if ($response->code == 200) {
my $extractor = HTML::ExtractContent->new;
my $content = $response->decoded_content;
my $title = $event->{entry}->title;
if (!utf8::is_utf8($content)) {
$self->logger->debug($self->logger_prefix.'{'.$event->{run_id}.'} No utf8, trying recode content');
$content = decode("Detect", $content);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Ylastic/CostAgent.pm view on Meta::CPAN
}
sub _service_list {
my $self = shift;
return $self->{services} if $self->{services};
my $list = $self->mech->get($URL{ylastic_service_list})->decoded_content;
chomp $list;
return $self->{services} = [split q{,}, $list];
}
sub _start_date {
view all matches for this distribution
view release on metacpan or search on metacpan
script/_chinese-zodiac-of view on Meta::CPAN
# $rargs->{$arg} //= {};
# $val_set = 1; $val = $_[2];
# $rargs->{$arg}{$_[1]} = $val;
# } else {
# {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# die "Invalid YAML/JSON in arg '$fqarg'";
# }
script/_chinese-zodiac-of view on Meta::CPAN
# } elsif (defined $extra->{is_neg}) {
# $go_spec->{$ospec} = sub { $handler->($_[0], 1) };
# } elsif ($extra->{is_base64}) {
# $go_spec->{$ospec} = sub {
# require MIME::Base64;
# my $decoded = MIME::Base64::decode($_[1]);
# $handler->($_[0], $decoded);
# };
# } else {
# $go_spec->{$ospec} = $handler;
# }
#
script/_chinese-zodiac-of view on Meta::CPAN
# warn "Clash of option: $jopt, not added";
# } else {
# my $jospec = "$jopt=s";
# my $parsed = {type=>"s", opts=>[$jopt]};
# $go_spec->{$jospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid JSON in option --$jopt: $_[1]: $e";
# }
# };
# $specmeta->{$jospec} = {arg=>$arg, fqarg=>$fqarg, is_json=>1, parsed=>$parsed, %$extra};
script/_chinese-zodiac-of view on Meta::CPAN
# warn "Clash of option: $yopt, not added";
# } else {
# my $yospec = "$yopt=s";
# my $parsed = {type=>"s", opts=>[$yopt]};
# $go_spec->{$yospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid YAML in option --$yopt: $_[1]: $e";
# }
# };
# $specmeta->{$yospec} = {arg=>$arg, fqarg=>$fqarg, is_yaml=>1, parsed=>$parsed, %$extra};
script/_chinese-zodiac-of view on Meta::CPAN
# !$is_array_of_simple && !$is_hash_of_simple) {
# my $i = 0;
# for (@$val) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as YAML: $e";
# }
# }
script/_chinese-zodiac-of view on Meta::CPAN
# }
# }
# if (!($arg_spec->{slurpy} // $arg_spec->{greedy}) && !$is_simple) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as YAML: $e";
# }
# }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ZofCMS/Plugin/BasicLWP.pm view on Meta::CPAN
sub _defaults {
return (
t_name => 'plug_basic_lwp',
t_key => 'd',
decoded => 0,
uri_fix => 0,
ua_args => [
agent => 'Opera 9.2',
timeout => 30,
],
lib/App/ZofCMS/Plugin/BasicLWP.pm view on Meta::CPAN
unless ( $response->is_success ) {
$template->{ $t_key }{ $t_name . '_error' } = $response->status_line;
return;
}
$template->{ $t_key }{ $t_name } = $conf->{decoded}
? $response->decoded_content
: $response->content;
return 1;
}
lib/App/ZofCMS/Plugin/BasicLWP.pm view on Meta::CPAN
plug_basic_lwp => {
uri => 'http://zofdesign.com/', # everything but 'uri' is optional
t_name => 'plug_basic_lwp',
t_key => 'd',
decoded => 0,
fix_uri => 0,
ua_args => [
agent => 'Opera 9.2',
timeout => 30,
],
lib/App/ZofCMS/Plugin/BasicLWP.pm view on Meta::CPAN
t_key => 'd',
B<Optional>. Takes a string as a value. Specifies the name of B<first-level> key in ZofCMS
Template hashref in which to create the C<t_name> key (see above). B<Defaults to:> C<d>
=head3 C<decoded>
decoded => 0,
B<Optional>. Takes either true or false values as a value. When set to a I<true> value,
the content will be given us with C<decoded_content()>. When set to a I<false> value, the
content will be given us with C<content()> method. See L<HTTP::Response> for description
of those two methods. B<Defaults to:> C<0> (use C<content()>)
=head3 C<fix_uri>
view all matches for this distribution
view release on metacpan or search on metacpan
# } elsif ($is_simple) {
# $val_set = 1; $val = $_[1];
# $rargs->{$arg} = $val;
# } else {
# {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# die "Invalid YAML/JSON in arg '$fqarg'";
# }
# } elsif (defined $extra->{is_neg}) {
# $go_spec->{$ospec} = sub { $handler->($_[0], 1) };
# } elsif ($extra->{is_base64}) {
# $go_spec->{$ospec} = sub {
# require MIME::Base64;
# my $decoded = MIME::Base64::decode($_[1]);
# $handler->($_[0], $decoded);
# };
# } else {
# $go_spec->{$ospec} = $handler;
# }
#
# warn "Clash of option: $jopt, not added";
# } else {
# my $jospec = "$jopt=s";
# my $parsed = {type=>"s", opts=>[$jopt]};
# $go_spec->{$jospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid JSON in option --$jopt: $_[1]: $e";
# }
# };
# $specmeta->{$jospec} = {arg=>$arg, fqarg=>$fqarg, is_json=>1, parsed=>$parsed, %$extra};
# warn "Clash of option: $yopt, not added";
# } else {
# my $yospec = "$yopt=s";
# my $parsed = {type=>"s", opts=>[$yopt]};
# $go_spec->{$yospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid YAML in option --$yopt: $_[1]: $e";
# }
# };
# $specmeta->{$yospec} = {arg=>$arg, fqarg=>$fqarg, is_yaml=>1, parsed=>$parsed, %$extra};
# !$is_array_of_simple) {
# my $i = 0;
# for (@$val) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as YAML: $e";
# }
# }
# }
# }
# if (!$arg_spec->{greedy} && !$is_simple) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as YAML: $e";
# }
# }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/bovespa.pm view on Meta::CPAN
my $response = $ua->get( $url . $query_params );
my $raw_html;
if ( $response->is_success ){
$raw_html = $response->decoded_content;
}else{
die;
}
my $data = decode_json $raw_html;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cdnget/Downloader.pm view on Meta::CPAN
my $img;
given ($headers->content_type)
{
when ("image/png")
{
$img = GD::Image->newFromPngData($response->decoded_content) or $self->throw($!);
}
when ("image/jpeg")
{
$img = GD::Image->newFromJpegData($response->decoded_content) or $self->throw($!);
}
default
{
$self->throw("Unsupported content type for image");
}
lib/App/cdnget/Downloader.pm view on Meta::CPAN
$self->throw("Unsupported content type for css") unless $headers->content_type =~ /^(text\/css|application\/x\-pointplus)$/;
given ($hook)
{
when (/^cssminify$/i)
{
my $data = CSS::Minifier::XS::minify($response->decoded_content);
return ("Status: 200\r\nContent-Type: ".$headers->content_type."\r\nContent-Length: ".length($data)."\r\n", $data);
}
default
{
$self->throw("Unsupported css hook");
lib/App/cdnget/Downloader.pm view on Meta::CPAN
$self->throw("Unsupported content type for js") unless $headers->content_type =~ /^(text\/javascript|text\/ecmascript|application\/javascript|application\/ecmascript|application\/x\-javascript)$/;
given ($hook)
{
when (/^jsminify$/i)
{
my $data = JavaScript::Minifier::XS::minify($response->decoded_content);
return ("Status: 200\r\nContent-Type: ".$headers->content_type."\r\nContent-Length: ".length($data)."\r\n", $data);
}
default
{
$self->throw("Unsupported js hook");
lib/App/cdnget/Downloader.pm view on Meta::CPAN
$self->throw("Download failed") if $response->header("Client-Aborted");
unless ($self->hook)
{
unless ($response->is_success)
{
$content_cb->($response->decoded_content, $response);
}
} else
{
if ($response->is_success)
{
lib/App/cdnget/Downloader.pm view on Meta::CPAN
$fh->print($header."\r\n".$data) or $self->throw($!);
}
} else
{
$response_header->($response, $ua);
$content_cb->($response->decoded_content, $response);
}
}
};
do
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cloudconvert.pm view on Meta::CPAN
$response = $ua->mirror( $response->header('location'), $outputfile );
} else {
my $error = "conversion failed";
if (!$response->is_success) {
if ($response->header('content-type') eq 'application/json') {
my $content = from_json($response->decoded_content);
$error = $content->{error};
}
}
say STDERR $response->code, ": ", $error;
return 1;
view all matches for this distribution
view release on metacpan or search on metacpan
script/cpanchanges view on Meta::CPAN
warn "Request '$url' failed: ", $response->status_line, "\n"
unless $response->code == 404;
return;
}
my $result = eval { decode_json($response->decoded_content) };
if ($@ or not $result) {
warn "Error decoding response: $@\n";
return;
}
return $result;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanel.pm view on Meta::CPAN
Will print the return value, using L<Mojo::Util/dumper> except for
C<download>.
=head2 dispatch_cmd_raw_p
Returns a promise of the decoded JSON value or C<download>ed content.
=head2 dir_walk_p
Takes C<$from_dir>, C<$to_dir>, C<$from_map>, C<$to_map>. Copies the
information in the first directory to the second, using the respective
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpangrep.pm view on Meta::CPAN
if (not $response->is_success) {
warn "Request failed: ", $response->status_line, "\n";
return;
}
my $content = $response->decoded_content;
debug("Successfully received " . length($content) . " bytes");
my $result = eval { decode_json($content) };
if ($@ or not $result) {
warn "Error decoding JSON response: $@\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
};
$self->{_backends}{get} = sub {
my $self = shift;
my $res = $ua->()->request(HTTP::Request->new(GET => $_[0]));
return unless $res->is_success;
return $res->decoded_content;
};
$self->{_backends}{mirror} = sub {
my $self = shift;
my $res = $ua->()->mirror(@_);
die $res->content if $res->code == 501;
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
This section supposes that your perl vresion is 5.8 or later.
If you know a JSON text from an outer world - a network, a file content, and so on,
is encoded in UTF-8, you should use C<decode_json> or C<JSON> module object
with C<utf8> enable. And the decoded result will contain UNICODE characters.
# from network
my $json = JSON::PP->new->utf8;
my $json_text = CGI->new->param( 'json_data' );
my $perl_scalar = $json->decode( $json_text );
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
C<collect_pod> is a optional boolean argument that determines whether POD
data is collected and stored for reference. POD data is not collected by
default. POD headings are always collected.
If the file begins by an UTF-8, UTF-16BE or UTF-16LE byte-order mark, then
it is skipped before processing, and the content of the file is also decoded
appropriately starting from perl 5.8.
=head2 C<< new_from_handle($handle, $filename, collect_pod => 1) >>
This works just like C<new_from_file>, except that a handle can be provided
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
directories to search for the module. If none are given, the default is
@INC.
If the file that contains the module begins by an UTF-8, UTF-16BE or
UTF-16LE byte-order mark, then it is skipped before processing, and the
content of the file is also decoded appropriately starting from perl 5.8.
=head2 C<< find_module_by_name($module, \@dirs) >>
Returns the path to a module given the module or package name. A list
of directories can be passed in as an optional parameter, otherwise
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
identical calling semantics are used. These may only be used with YAML sources.
All error reporting is done with exceptions (die'ing).
Note that META files are expected to be in UTF-8 encoding, only. When
converted string data, it must first be decoded from UTF-8.
=begin Pod::Coverage
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
my $metadata_structure = Parse::CPAN::Meta->load_yaml_string($yaml_string);
This method deserializes the given string of YAML and returns the first
document in it. (CPAN metadata files should always have only one document.)
If the source was UTF-8 encoded, the string must be decoded before calling
C<load_yaml_string>.
=head2 load_json_string
my $metadata_structure = Parse::CPAN::Meta->load_json_string($json_string);
This method deserializes the given string of JSON and the result.
If the source was UTF-8 encoded, the string must be decoded before calling
C<load_json_string>.
=head2 load_string
my $metadata_structure = Parse::CPAN::Meta->load_string($some_string);
view all matches for this distribution
view release on metacpan or search on metacpan
};
$self->{_backends}{get} = sub {
my $self = shift;
my $res = $ua->()->request(HTTP::Request->new(GET => $_[0]));
return unless $res->is_success;
return $res->decoded_content;
};
$self->{_backends}{mirror} = sub {
my $self = shift;
my $res = $ua->()->mirror(@_);
$res->code;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cryp/Masternode/bulwark.pm view on Meta::CPAN
my $output;
system({log=>1, shell=>0, capture_stdout=>\$output},
"ssh", "-l", $ssh_user, $rec->{ip}, $ssh_cmd);
my $output_decoded;
eval { $output_decoded = JSON::MaybeXS->new->decode($output) };
if ($@) {
log_error "Can't decode JSON output '$output', skipped";
last CHECK_STATUS;
}
my %mns;
for (@$output_decoded) {
my $key = "$_->{txhash} $_->{outidx}";
$mns{$key} = $_;
}
for my $rec (@res) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/fftrim.pm view on Meta::CPAN
$compression_source = $source_files[0];
}
my $final = trim_target($target);
$start = decode_cutpoint($start, \@source_files);
$end = decode_cutpoint($end, \@source_files);
say STDERR "decoded start: $start, decoded end: $end";
compress_and_trim_video(
$compression_source,
$final,
$start,
$end
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/financeta/data/gemini.pm view on Meta::CPAN
$log->debug("Performing GET request to $url");
my $lwp = LWP::UserAgent->new(timeout => 60);
$lwp->env_proxy;
my $res = $lwp->get($url);
if ($res->is_success) {
my $content = $res->decoded_content;
if (defined $content and length($content)) {
my $jquotes = decode_json($content);
if (ref $jquotes eq 'ARRAY' and scalar(@$jquotes)) {
## sort quotes by timestamp
my @sorted = sort { $a->[0] <=> $b->[0] } @$jquotes;
view all matches for this distribution
view release on metacpan or search on metacpan
script/_finddo view on Meta::CPAN
# $rargs->{$arg} //= {};
# $val_set = 1; $val = $_[2];
# $rargs->{$arg}{$_[1]} = $val;
# } else {
# {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# die "Invalid YAML/JSON in arg '$fqarg'";
# }
script/_finddo view on Meta::CPAN
# } elsif (defined $extra->{is_neg}) {
# $go_spec->{$ospec} = sub { $handler->($_[0], 1) };
# } elsif ($extra->{is_base64}) {
# $go_spec->{$ospec} = sub {
# require MIME::Base64;
# my $decoded = MIME::Base64::decode($_[1]);
# $handler->($_[0], $decoded);
# };
# } else {
# $go_spec->{$ospec} = $handler;
# }
#
script/_finddo view on Meta::CPAN
# warn "Clash of option: $jopt, not added";
# } else {
# my $jospec = "$jopt=s";
# my $parsed = {type=>"s", opts=>[$jopt]};
# $go_spec->{$jospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid JSON in option --$jopt: $_[1]: $e";
# }
# };
# $specmeta->{$jospec} = {arg=>$arg, fqarg=>$fqarg, is_json=>1, parsed=>$parsed, %$extra};
script/_finddo view on Meta::CPAN
# warn "Clash of option: $yopt, not added";
# } else {
# my $yospec = "$yopt=s";
# my $parsed = {type=>"s", opts=>[$yopt]};
# $go_spec->{$yospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid YAML in option --$yopt: $_[1]: $e";
# }
# };
# $specmeta->{$yospec} = {arg=>$arg, fqarg=>$fqarg, is_yaml=>1, parsed=>$parsed, %$extra};
script/_finddo view on Meta::CPAN
# !$is_array_of_simple && !$is_hash_of_simple) {
# my $i = 0;
# for (@$val) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as YAML: $e";
# }
# }
script/_finddo view on Meta::CPAN
# }
# }
# if (!$arg_spec->{greedy} && !$is_simple) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as YAML: $e";
# }
# }
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-base56 view on Meta::CPAN
# $rargs->{$arg} //= {};
# $val_set = 1; $val = $_[2];
# $rargs->{$arg}{$_[1]} = $val;
# } else {
# {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# die "Invalid YAML/JSON in arg '$fqarg'";
# }
script/_genpw-base56 view on Meta::CPAN
# } elsif (defined $extra->{is_neg}) {
# $go_spec->{$ospec} = sub { $handler->($_[0], 1) };
# } elsif ($extra->{is_base64}) {
# $go_spec->{$ospec} = sub {
# require MIME::Base64;
# my $decoded = MIME::Base64::decode($_[1]);
# $handler->($_[0], $decoded);
# };
# } else {
# $go_spec->{$ospec} = $handler;
# }
#
script/_genpw-base56 view on Meta::CPAN
# warn "Clash of option: $jopt, not added";
# } else {
# my $jospec = "$jopt=s";
# my $parsed = {type=>"s", opts=>[$jopt]};
# $go_spec->{$jospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid JSON in option --$jopt: $_[1]: $e";
# }
# };
# $specmeta->{$jospec} = {arg=>$arg, fqarg=>$fqarg, is_json=>1, parsed=>$parsed, %$extra};
script/_genpw-base56 view on Meta::CPAN
# warn "Clash of option: $yopt, not added";
# } else {
# my $yospec = "$yopt=s";
# my $parsed = {type=>"s", opts=>[$yopt]};
# $go_spec->{$yospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid YAML in option --$yopt: $_[1]: $e";
# }
# };
# $specmeta->{$yospec} = {arg=>$arg, fqarg=>$fqarg, is_yaml=>1, parsed=>$parsed, %$extra};
script/_genpw-base56 view on Meta::CPAN
# !$is_array_of_simple && !$is_hash_of_simple) {
# my $i = 0;
# for (@$val) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as YAML: $e";
# }
# }
script/_genpw-base56 view on Meta::CPAN
# }
# }
# if (!$arg_spec->{greedy} && !$is_simple) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as YAML: $e";
# }
# }
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-base58 view on Meta::CPAN
# $rargs->{$arg} //= {};
# $val_set = 1; $val = $_[2];
# $rargs->{$arg}{$_[1]} = $val;
# } else {
# {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# die "Invalid YAML/JSON in arg '$fqarg'";
# }
script/_genpw-base58 view on Meta::CPAN
# } elsif (defined $extra->{is_neg}) {
# $go_spec->{$ospec} = sub { $handler->($_[0], 1) };
# } elsif ($extra->{is_base64}) {
# $go_spec->{$ospec} = sub {
# require MIME::Base64;
# my $decoded = MIME::Base64::decode($_[1]);
# $handler->($_[0], $decoded);
# };
# } else {
# $go_spec->{$ospec} = $handler;
# }
#
script/_genpw-base58 view on Meta::CPAN
# warn "Clash of option: $jopt, not added";
# } else {
# my $jospec = "$jopt=s";
# my $parsed = {type=>"s", opts=>[$jopt]};
# $go_spec->{$jospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid JSON in option --$jopt: $_[1]: $e";
# }
# };
# $specmeta->{$jospec} = {arg=>$arg, fqarg=>$fqarg, is_json=>1, parsed=>$parsed, %$extra};
script/_genpw-base58 view on Meta::CPAN
# warn "Clash of option: $yopt, not added";
# } else {
# my $yospec = "$yopt=s";
# my $parsed = {type=>"s", opts=>[$yopt]};
# $go_spec->{$yospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid YAML in option --$yopt: $_[1]: $e";
# }
# };
# $specmeta->{$yospec} = {arg=>$arg, fqarg=>$fqarg, is_yaml=>1, parsed=>$parsed, %$extra};
script/_genpw-base58 view on Meta::CPAN
# !$is_array_of_simple && !$is_hash_of_simple) {
# my $i = 0;
# for (@$val) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as YAML: $e";
# }
# }
script/_genpw-base58 view on Meta::CPAN
# }
# }
# if (!$arg_spec->{greedy} && !$is_simple) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as YAML: $e";
# }
# }
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-base64 view on Meta::CPAN
# $rargs->{$arg} //= {};
# $val_set = 1; $val = $_[2];
# $rargs->{$arg}{$_[1]} = $val;
# } else {
# {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# die "Invalid YAML/JSON in arg '$fqarg'";
# }
script/_genpw-base64 view on Meta::CPAN
# } elsif (defined $extra->{is_neg}) {
# $go_spec->{$ospec} = sub { $handler->($_[0], 1) };
# } elsif ($extra->{is_base64}) {
# $go_spec->{$ospec} = sub {
# require MIME::Base64;
# my $decoded = MIME::Base64::decode($_[1]);
# $handler->($_[0], $decoded);
# };
# } else {
# $go_spec->{$ospec} = $handler;
# }
#
script/_genpw-base64 view on Meta::CPAN
# warn "Clash of option: $jopt, not added";
# } else {
# my $jospec = "$jopt=s";
# my $parsed = {type=>"s", opts=>[$jopt]};
# $go_spec->{$jospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid JSON in option --$jopt: $_[1]: $e";
# }
# };
# $specmeta->{$jospec} = {arg=>$arg, fqarg=>$fqarg, is_json=>1, parsed=>$parsed, %$extra};
script/_genpw-base64 view on Meta::CPAN
# warn "Clash of option: $yopt, not added";
# } else {
# my $yospec = "$yopt=s";
# my $parsed = {type=>"s", opts=>[$yopt]};
# $go_spec->{$yospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid YAML in option --$yopt: $_[1]: $e";
# }
# };
# $specmeta->{$yospec} = {arg=>$arg, fqarg=>$fqarg, is_yaml=>1, parsed=>$parsed, %$extra};
script/_genpw-base64 view on Meta::CPAN
# !$is_array_of_simple && !$is_hash_of_simple) {
# my $i = 0;
# for (@$val) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as YAML: $e";
# }
# }
script/_genpw-base64 view on Meta::CPAN
# }
# }
# if (!$arg_spec->{greedy} && !$is_simple) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as YAML: $e";
# }
# }
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-id view on Meta::CPAN
# $rargs->{$arg} //= {};
# $val_set = 1; $val = $_[2];
# $rargs->{$arg}{$_[1]} = $val;
# } else {
# {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $val_set = 1; $val = $decoded;
# $rargs->{$arg} = $val;
# last;
# }
# die "Invalid YAML/JSON in arg '$fqarg'";
# }
script/_genpw-id view on Meta::CPAN
# } elsif (defined $extra->{is_neg}) {
# $go_spec->{$ospec} = sub { $handler->($_[0], 1) };
# } elsif ($extra->{is_base64}) {
# $go_spec->{$ospec} = sub {
# require MIME::Base64;
# my $decoded = MIME::Base64::decode($_[1]);
# $handler->($_[0], $decoded);
# };
# } else {
# $go_spec->{$ospec} = $handler;
# }
#
script/_genpw-id view on Meta::CPAN
# warn "Clash of option: $jopt, not added";
# } else {
# my $jospec = "$jopt=s";
# my $parsed = {type=>"s", opts=>[$jopt]};
# $go_spec->{$jospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_json($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid JSON in option --$jopt: $_[1]: $e";
# }
# };
# $specmeta->{$jospec} = {arg=>$arg, fqarg=>$fqarg, is_json=>1, parsed=>$parsed, %$extra};
script/_genpw-id view on Meta::CPAN
# warn "Clash of option: $yopt, not added";
# } else {
# my $yospec = "$yopt=s";
# my $parsed = {type=>"s", opts=>[$yopt]};
# $go_spec->{$yospec} = sub {
# my ($success, $e, $decoded);
# ($success, $e, $decoded) = _parse_yaml($_[1]);
# if ($success) {
# $rargs->{$arg} = $decoded;
# } else {
# die "Invalid YAML in option --$yopt: $_[1]: $e";
# }
# };
# $specmeta->{$yospec} = {arg=>$arg, fqarg=>$fqarg, is_yaml=>1, parsed=>$parsed, %$extra};
script/_genpw-id view on Meta::CPAN
# !$is_array_of_simple && !$is_hash_of_simple) {
# my $i = 0;
# for (@$val) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($_);
# if ($success) {
# $_ = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$i as YAML: $e";
# }
# }
script/_genpw-id view on Meta::CPAN
# }
# }
# if (!($arg_spec->{slurpy} // $arg_spec->{greedy}) && !$is_simple) {
# TRY_PARSING_AS_JSON_YAML:
# {
# my ($success, $e, $decoded);
# if ($per_arg_json) {
# ($success, $e, $decoded) = _parse_json($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as JSON: $e";
# }
# }
# if ($per_arg_yaml) {
# ($success, $e, $decoded) = _parse_yaml($val);
# if ($success) {
# $val = $decoded;
# last TRY_PARSING_AS_JSON_YAML;
# } else {
# warn "Failed trying to parse argv #$arg_spec->{pos} as YAML: $e";
# }
# }
view all matches for this distribution