view release on metacpan or search on metacpan
script/_genpw-ind 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-ind 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-ind 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-ind 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-ind 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-ind 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/FlashVideo/Mechanize.pm view on Meta::CPAN
my($self, $html) = @_;
my $charset = _parse_charset($self->response->header("Content-type"));
# If we have no character set in the header (therefore it is worth looking
# for a http-equiv in the body) or the content hasn't been decoded (older
# versions of Mech).
if($LWP::UserAgent::VERSION < 5.827
&& (!$charset || !Encode::is_utf8($html))) {
# HTTP::Message helpfully decodes to iso-8859-1 by default. Therefore we
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/gh/Command/Pullreq/Show.pm view on Meta::CPAN
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
my $res = $ua->get($pull->{patch_url});
if ($res->is_success) {
print $res->decoded_content;
} else {
warn $res->message;
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/man/man1/git-hub.1 view on Meta::CPAN
.IX Item "-H"
Show the \s-1API\s0 response headers.
.ie n .IP """\-J""" 4
.el .IP "\f(CW\-J\fR" 4
.IX Item "-J"
Show the \s-1API\s0 response \s-1JSON,\s0 in decoded form.
.ie n .IP """\-R""" 4
.el .IP "\f(CW\-R\fR" 4
.IX Item "-R"
Repeat the last command, using the previous \s-1API\s0 server response. Useful for development and debugging. (Beware, only caches the most recent \s-1API\s0 call, so not really good for commands that make multiple calls).
.ie n .IP """\-x""" 4
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/gqmt.pm view on Meta::CPAN
$res_cont->{documentation_url} );
print $res_error;
exit 1;
}
my $reply = $self->jso->decode( $res->decoded_content );
if ( exists $reply->{errors} ) {
unshift @{$reply->{errors}}, "--- ERROR ---";
p ( $reply->{errors}, colored => $self->option('colored') );
exit 1;
lib/App/gqmt.pm view on Meta::CPAN
$res_cont->{documentation_url} );
print $res_error;
exit 1;
}
my $reply = $self->jso->decode( $res->decoded_content );
p ( $reply, caller_message => "REPLY: __FILENAME__:__LINE__ ", colored => $self->option('colored') )
if $self->option('d') > 2 && ! defined $arg->{inf}->{startCursor};
if ( exists $reply->{errors} ) {
view all matches for this distribution
view release on metacpan or search on metacpan
# $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'";
# }
# } 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 ($optlabel) vs existing ($seen_opts->{$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 ($optlabel) vs existing ($seen_opts->{$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 && !$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";
# }
# }
# }
# }
# 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/ipinfo.pm view on Meta::CPAN
=item * C<%h> - the hostname for the IP address
=item * C<%i> - the IP address
=item * C<%j> - all the data as JSON, in a UTF-8 decoded string
=item * C<%k> - the continent of the organization
=item * C<%L> - the latitude of the organization
lib/App/ipinfo.pm view on Meta::CPAN
next if utf8::is_utf8($i->{$key});
$i->{$key} = decode( 'UTF-8', $i->{$key} );
}
}
$info->meta->{decoded} = 1;
};
=item * default_error_fh
Returns the default for the error filehandle. In this module, it's
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/jl.pm view on Meta::CPAN
}
sub _process {
my ($self) = @_;
my $decoded = eval {
$self->{_json}->decode($self->{__current_orig_line});
};
if ($@) {
return $self->{__current_orig_line};
}
else {
$self->_recursive_process($decoded);
return $self->_encode($decoded);
}
}
sub _encode {
my ($self, $decoded) = @_;
if ($self->opt('yaml')) {
return YAML::Syck::Dump($decoded);
}
else {
return $self->{_json}->encode($decoded);
}
}
sub _recursive_process {
my ($self, $decoded) = @_;
$self->_recursive_pre_process($decoded);
$self->{_recursive_call} = $MAX_RECURSIVE_CALL;
$self->_recursive_decode_json($decoded);
$self->_recursive_post_process($decoded);
}
sub _recursive_pre_process {
my ($self, $decoded) = @_;
$INVOKER->invoke(\&_trim => $decoded);
$self->_invoker(\&_split_lf => $decoded) if $self->opt('x');
}
sub _recursive_post_process {
my ($self, $decoded) = @_;
if ($self->opt('x')) {
$self->_invoker(\&_split_lf => $decoded);
}
if ($self->opt('xx')) {
$self->_invoker(\&_split_comma => $decoded);
}
if ($self->opt('xxx')) {
$self->_invoker(\&_split_label => $decoded);
}
if ($self->opt('xxxx') || $self->opt('timestamp_key')) {
if ($self->opt('xxxxx')) {
$INVOKER->invoke(\&_forcely_convert_timestamp => $decoded);
}
else {
$self->_invoker(\&_convert_timestamp => $decoded);
}
}
$INVOKER->invoke(\&_trim => $decoded);
}
my $LAST_VALUE;
sub _invoker {
lib/App/jl.pm view on Meta::CPAN
Sub::Data::Recursive->invoke(sub {
if ($self->{_recursive_call} > 0) {
my $orig = $_[0];
return if $orig =~ m!^\[\d+\]$!;
if (!_is_number($_[0])) {
my $decoded = eval {
$self->{_json}->decode($orig);
};
if (!$@) {
$_[0] = $decoded;
$self->{_recursive_call}--;
$self->_recursive_decode_json($_[0]); # recursive calling
}
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
script/_metasyn 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/_metasyn 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/_metasyn 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/_metasyn 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/_metasyn 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/_metasyn 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/perlbrew.pm view on Meta::CPAN
# releases and minor versions when needed (using
# filter_perl_available)
my $json = http_get('https://fastapi.metacpan.org/v1/release/versions/perl')
or die "\nERROR: Unable to retrieve list of perls from Metacpan.\n\n";
my $decoded = decode_json($json);
for my $release ( @{ $decoded->{releases} } ) {
next
if !$release->{authorized};
push @perllist, [$release->{name}, $release->{download_url}];
}
foreach my $perl ( $self->filter_perl_available( \@perllist ) ) {
view all matches for this distribution
view release on metacpan or search on metacpan
t/features/step_definitions/basic.pl~ view on Meta::CPAN
$t->post_ok( $route => $accept_header => json => $request );
};
Then qr{the client gets a valid response} => sub {
my $data = get_result;
croak 'JSON decoded, token is missing' if !exists $data->{token};
my $token = $data->{token};
my $username = $t->app->service->{authentication}->validate_token($token);
is $username, C->stash->{scenario}->{username};
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/perlrdf/FileSpec/InputFile.pm view on Meta::CPAN
local $/ = <STDIN>;
return $/;
}
else
{
return $self->response->decoded_content;
}
}
sub _build_handle
{
view all matches for this distribution
view release on metacpan or search on metacpan
t/oddmuse-wiki.pl view on Meta::CPAN
sub GetRaw {
my $uri = shift;
return unless eval { require LWP::UserAgent; };
my $ua = LWP::UserAgent->new;
my $response = $ua->get($uri);
return $response->decoded_content if $response->is_success;
}
sub DoJournal {
print GetHeader(undef, T('Journal'));
print $q->start_div({-class=>'content journal'});
t/oddmuse-wiki.pl view on Meta::CPAN
if (not eval { require XML::RSS; }) {
my $err = $@;
return $q->div({-class=>'rss'}, $q->p({-class=>'error'}, $q->strong(T('XML::RSS is not available on this system.')), $err));
}
# All strings that are concatenated with strings returned by the RSS
# feed must be decoded. Without this decoding, 'diff' and 'history'
# translations will be double encoded when printing the result.
my $tDiff = T('diff');
my $tHistory = T('history');
my $wikins = 'http://purl.org/rss/1.0/modules/wiki/';
my $rdfns = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#';
t/oddmuse-wiki.pl view on Meta::CPAN
}
%todo = (); # because the uris in the response may have changed due to redirects
my $entries = $pua->wait();
foreach (keys %$entries) {
my $uri = $entries->{$_}->request->uri;
$data{$uri} = $entries->{$_}->response->decoded_content;
}
}
}
foreach my $uri (keys %todo) { # default operation: synchronous fetching
$data{$uri} = GetRaw($uri);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/plackbench.pm view on Meta::CPAN
sub _execute_request {
my $self = shift;
my $request = shift;
my $response = $self->tester->request($request);
if ( $response->is_error() ) {
die "Request failed: " . $response->decoded_content;
}
return;
}
view all matches for this distribution
view release on metacpan or search on metacpan
bin/plx-packed view on Meta::CPAN
$fatpacked{"App/cpanminus/Dependency.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS_DEPENDENCY';
package App::cpanminus::Dependency;use strict;use CPAN::Meta::Requirements;sub from_prereqs {my($class,$prereqs,$phases,$types)=@_;my@deps;for my$type (@$types){push@deps,$class->from_versions($prereqs->merged_requirements($phases,[$type])->as_st...
APP_CPANMINUS_DEPENDENCY
$fatpacked{"App/cpanminus/script.pm"} = '#line '.(1+__LINE__).' "'.__FILE__."\"\n".<<'APP_CPANMINUS_SCRIPT';
package App::cpanminus::script;use strict;use Config;use Cwd ();use App::cpanminus;use App::cpanminus::Dependency;use File::Basename ();use File::Find ();use File::Path ();use File::Spec ();use File::Copy ();use File::Temp ();use Getopt::Long ();...
It appears your cpanm executable was installed via `perlbrew install-cpanm`.
cpanm --self-upgrade won't upgrade the version of cpanm you're running.
Run the following command to get it upgraded.
view all matches for this distribution
view release on metacpan or search on metacpan
script/_ppgrep 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/_ppgrep 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/_ppgrep 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/_ppgrep 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/_ppgrep 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/_ppgrep 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
script/_reposdb-inline 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/_reposdb-inline 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/_reposdb-inline 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/_reposdb-inline 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/_reposdb-inline 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/_reposdb-inline 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
t/11parser-markdown.t view on Meta::CPAN
is( $p[4]->text, "strikethrough", 'strikethrough text' );
ok( $p[4]->text->get_tag_at( 0, "strikethrough" ), 'strikethrough tag' );
};
subtest "HTML entities get decoded" => sub {
my @p = App::sdview::Parser::Markdown->new->parse_string( <<"EOMARKDOWN" );
Some content with non-breaking spaces in it.
Text – with HTML entities
EOMARKDOWN
view all matches for this distribution
view release on metacpan or search on metacpan
script/sitelen-mute view on Meta::CPAN
--title "TITLE" title for Facebook and Twitter previews
--description "DESC" description for Facebook and Twitter previews};
exit $_[0];
}
# Options: text needs to be decoded based on locale, but filenames are not
# decoded; URLs are decoded because international domain names (IDNA) and
# internationalized resource identifiers (IRI) can still happen.
GetOptions(
'help|h' => sub { print_help(0); },
'version' => sub { say "$0 $VERSION"; exit 0; },
'c=s' => sub { @captions = @{ parse_captions($_[0], $_[1]) || [] }; },
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/starbucksloginator.pm view on Meta::CPAN
sub try {
my $self = shift;
my $site = shift;
my $response = agent->get( "http://$site" );
my $success = $response->decoded_content !~ m/<title>[^<]*Starbucks.*?</i;
return ( $success, $response );
}
sub try_to_get_out {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
t/app_tarweb.t view on Meta::CPAN
};
};
note http_tx->res->as_string;
foreach my $href (map { $_->attr('href') } Mojo::DOM58->new(http_tx->res->decoded_content)->find('ul li a')->to_array->@*)
{
my $url = URI->new_abs( $href, $url );
http_request
GET($url),
http_response {
t/app_tarweb.t view on Meta::CPAN
dom { attr href => 'foo.txt'; content 'foo.txt' },
];
};
};
foreach my $href (map { $_->attr('href') } Mojo::DOM58->new(http_tx->res->decoded_content)->find('ul li a')->to_array->@*)
{
my $url = URI->new_abs( $href, $url );
http_request
GET($url),
http_response {
view all matches for this distribution
view release on metacpan or search on metacpan
unless ($response->is_success) {
abend(EX_UNAVAILABLE,
"downloading $source failed: " . $response->status_line);
}
if (ref($dest) eq 'SCALAR') {
$$dest = $response->decoded_content;
}
return $dest;
}
# get_sources($URL)
view all matches for this distribution
view release on metacpan or search on metacpan
0.05 2016-03-04 22:23:53 CET
* Expose tls key and cert settings from UserAgent.
* Skip mentions from the registry from users i already follow.
* The argument to tweet was double decoded.
* Add new command register to register at a registry.
* Add new command query tweets
* Add new command query mentions
* Add new command query tags
* Add option --unfollowed to just list unfollowed user in query user.
view all matches for this distribution
view release on metacpan or search on metacpan
script/_wordlist 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/_wordlist view on Meta::CPAN
# warn "Clash of option $jopt ($optlabel) vs existing ($seen_opts->{$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/_wordlist view on Meta::CPAN
# warn "Clash of option: $yopt ($optlabel) vs existing ($seen_opts->{$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/_wordlist 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/_wordlist 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/wp/xmlrpc.pm view on Meta::CPAN
tags => ['common'],
},
);
# for each non-common arg, if the arg's value starts with '[' or '{' then it
# will be assumed to be JSON and will be JSON-decoded.
sub _convert_args_to_struct {
require JSON::MaybeXS;
my $args = shift;
for my $k (keys %$args) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/wsgetmail/MS365.pm view on Meta::CPAN
sub _fetch_messages {
my ($self, $filter) = @_;
my $messages = [ ];
my $fetched_count = 0;
# check if expecting to fetch more using result paging
my ($decoded_response);
if ($self->_next_fetch_url) {
my $response = $self->_client->get_request_by_url($self->_next_fetch_url);
unless ($response->is_success) {
warn "failed to fetch messages " . $response->status_line;
warn "response from server : " . $response->content if $self->debug;
$self->_have_messages_to_fetch(0);
return 0;
}
$decoded_response = decode_json( $response->content );
} else {
my $fields = [qw(id subject sender isRead sentDateTime toRecipients parentFolderId categories)];
$decoded_response = $self->_get_message_list($fields, $filter);
}
$messages = $decoded_response->{value};
if ($decoded_response->{'@odata.nextLink'}) {
$self->_next_fetch_url($decoded_response->{'@odata.nextLink'});
$self->_have_messages_to_fetch(1);
} else {
$self->_have_messages_to_fetch(0);
}
$self->_fetched_messages($messages);
view all matches for this distribution
view release on metacpan or search on metacpan
Date/time fields found in zip files are displayed in local time. Use the
`--utc` option to display these fields in Coordinated Universal Time (UTC).
### Filenames & Comments
Filenames and comments are decoded/encoded using the default system
encoding of the host running `zipdetails`. When the sytem encoding cannot
be determined `cp437` will be used.
The exceptions are
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apple/AppStoreConnect.pm view on Meta::CPAN
my $resp = $self->get_response(%args);
unless ($self->{curl}) {
die $resp->status_line unless $resp->is_success;
$resp = $resp->decoded_content;
}
return $args{raw} ? $resp : JSON::decode_json($resp);
}
view all matches for this distribution
view release on metacpan or search on metacpan
share/root/socket.io-0.9.16.js view on Meta::CPAN
* @param {Array} messages
* @api private
*/
parser.encodePayload = function (packets) {
var decoded = '';
if (packets.length == 1)
return packets[0];
for (var i = 0, l = packets.length; i < l; i++) {
var packet = packets[i];
decoded += '\ufffd' + packet.length + '\ufffd' + packets[i];
}
return decoded;
};
/**
* Decodes a packet
*
view all matches for this distribution