view release on metacpan or search on metacpan
0.15 9. Apr 2002
- Added patch from Brian Paulsen which causes correct handling of
non unicode charset (needed for some versions of win9x) and
more verbose debugging output (decoded flags)
0.14 26. Feb 2002
- fixed a problem that page content of Perl sometimes goes to the
stderr instead of stdout
view all matches for this distribution
view release on metacpan or search on metacpan
ModProxyPerlHtml.pm view on Meta::CPAN
encode/decode of those links you can use the ProxyHTMLRot13Links directive as
follow:
PerlAddVar ProxyHTMLRot13Links All
All links in the page will be decoded before being rewritten and re-encoded.
If obfuscation occurs on some attributs only you can set the value as a pair
of element:attribut where the decoding/encoding must be applied. For example:
PerlAddVar ProxyHTMLRot13Links a:data-href
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/Proxy.pm view on Meta::CPAN
return 1;
}
# figure out what charset a response was made in, code adapted from
# HTTP::Message::decoded_content
sub response_charset {
my ( $class, $r, $response ) = @_;
# pull apart Content-Type header and extract charset
my $charset;
lib/Apache2/Proxy.pm view on Meta::CPAN
# if the charset wasn't in the http header look for meta-equiv
unless ($charset) {
# default charset for HTTP::Message - if it couldn't guess it will
# have decoded as 8859-1, so we need to match that when
# re-encoding
return $charset || "ISO-8859-1";
}
}
lib/Apache2/Proxy.pm view on Meta::CPAN
}
$r->log->debug(
sprintf(
"$$ Request returned %d response: %s",
$response->code, Dumper( $response->decoded_content ),
)
) if VERBOSE_DEBUG;
no strict 'refs';
return $class->$sub( $r, $response );
lib/Apache2/Proxy.pm view on Meta::CPAN
#$Cache->add_known_not_html( $url => $response->content_type );
}
$r->log->debug( "$$ 200 for $url, length "
. length( $response->decoded_content )
. " bytes" )
if DEBUG;
my $response_content_ref = \$response->decoded_content;
# set the status line
$r->status_line( $response->status_line );
$r->log->debug( "$$ status line is " . $response->status_line )
if DEBUG;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Apache2/SSI.pm view on Meta::CPAN
=head2 decode_base64
Decode base64 data provided. When running under Apache mod_perl, this uses L<APR::Base64/decode> module, otherwise it uses L<MIME::Base64/decode>
If the decoded data contain utf8 data, this will decode the utf8 data using L<Encode/decode>
If an error occurred during decoding, it will return undef and set an L</error> object accordingly.
=head2 decode_entities
lib/Apache2/SSI.pm view on Meta::CPAN
Sets or gets the formatting for date and time values. The format takes the same values as L<POSIX/strftime>
=head1 Encoding
At present time, the html data are treated as utf8 data and decoded and encoded back as such.
If there is a need to broaden support for other charsets, let me know.
=head1 SSI Directives
view all matches for this distribution
view release on metacpan or search on metacpan
script/acme-cpanauthors view on Meta::CPAN
# }
#
# \@argv;
#}
#
## return ($err, $res, $decoded_val)
#sub _parse_raw_value {
# my ($self, $val, $needs_res) = @_;
#
# if ($val =~ /\A!/ && $self->{enable_encoding}) {
#
script/acme-cpanauthors view on Meta::CPAN
#
# if ($self->{warn_perl} && !$space && $val =~ /\A>/) {
# $self->_warn("Probably using Perl syntax instead of INI: $line");
# }
#
# # the common case is that value are not decoded or
# # quoted/bracketed/braced, so we avoid calling _parse_raw_value here
# # to avoid overhead
# if ($val =~ /\A["!\\[\{~]/) {
# $_raw_val = $val if $cb;
# my ($err, $parse_res, $decoded_val) = $self->_parse_raw_value($val);
# $self->_err("Invalid value: " . $err) if $err;
# $val = $decoded_val;
# } else {
# $_raw_val = $val if $cb;
# $val =~ s/\s*[#;].*//; # strip comment
# }
#
script/acme-cpanauthors view on Meta::CPAN
#C<section> (str, section name).
#
#=item * Found a key line
#
#Arguments passed: C<event> (str, 'section'), C<linum>, C<line>, C<cur_section>,
#C<key> (str, key name), C<val> (any, value name, already decoded if encoded),
#C<raw_val> (str, raw value).
#
#=back
#
#TODO: callback when there is merging.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Acmeman.pm view on Meta::CPAN
if ($response->is_success) {
unless ($self->dry_run_option) {
open(my $fd, '>', $name)
or abend(EX_CANTCREAT,
"can't open \"$name\" for writing: $!");
print $fd $response->decoded_content;
close $fd;
}
} else {
error("error downloading certificate from $letsencrypt_root_cert_url");
abend(EX_NOINPUT, $response->status_line);
view all matches for this distribution
view release on metacpan or search on metacpan
script/ap-represent view on Meta::CPAN
BSD-3-Clause
=cut
undef $/;
# from_json because UTF-8 is already decoded
my $blob = from_json(<STDIN>);
print_object(1, $blob);
print "\n";
view all matches for this distribution
view release on metacpan or search on metacpan
setup/import_export/perl.pl view on Meta::CPAN
my ($base_name, $path, $extension) = File::Basename::fileparse($file, ('\..*')) ;
my $file_name = $base_name . $extension ;
my ($base64_data, $header, $footer) = get_base64_data($file_name) ;
my $decoded_base64 = MIME::Base64::decode($base64_data);
my $self_to_resurect = decompress($decoded_base64) ;
my $VAR1 ;
my $resurected_self = eval $self_to_resurect ;
die $@ if $@ ;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Bitcoin/PaperWallet.pm view on Meta::CPAN
=over
=item
This module should properly handle unicode in command line, but for in-Perl
usage it is required to pass UTF8-decoded strings to it (like with C<use
utf8;>).
Internally, passwords are handled as-is, while seeds are encoded into UTF8
before passing them to SHA256.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/CSE/File.pm view on Meta::CPAN
sub _build_content{
my ($self) = @_;
my $raw_content = $self->raw_content();
unless( defined($raw_content) ){ return undef; }
my $decoded = eval{ Encode::decode($self->encoding(), $raw_content, Encode::FB_CROAK ); };
unless( $decoded ){
$LOGGER->debug("File ".$self->file_path()." failed to be decoded as ".$self->encoding().": ".$@);
return;
}
return $decoded;
}
sub effective_object{
my ($self) = @_;
return $self;
view all matches for this distribution
view release on metacpan or search on metacpan
t/lib/App/CamelPKI/Test.pm view on Meta::CPAN
}
=item I<jsoncall_remote($url, $struct, %args)>
Like L</jsonreq_remote> but instead of returning an L<HTTP::Response>
object, returns the decoded JSON data structure by reference and
throws an exception if the HTTP request isn't a success or doesn't
decode properly.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
devel/MON.pm view on Meta::CPAN
return @ret;
}
sub daily_parse {
my ($resp) = @_;
my $content = $resp->decoded_content (raise_error => 1);
# lines like
# <tr><th>Date</th><th>Class Symbol</th>...
my @lines = split /\n/, $content;
@lines = grep /^<tr>/, @lines;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Session/Cookie.pm view on Meta::CPAN
named "app_sessiondata" (and "app_sessiondata[2..n]").
When the values of these cookies are concatenated, they
form a Base64-encoded, gzipped, frozen multi-level hash of
session state data. To retrieve the state data, the text
is therefore decoded, gunzipped, and thawed (a la Storable).
Notes on length of cookies: See
http://developer.netscape.com/docs/manuals/js/client/jsref/cookies.htm
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DBBrowser/GetContent/Source.pm view on Meta::CPAN
my ( $sf ) = @_;
my $tu = Term::Choose::Util->new( $sf->{i}{tcu_default} );
my $default_dir = $sf->{d}{default_search_dir} // $sf->{i}{home_dir};
# Choose
my $dir = $tu->choose_a_directory(
{ init_dir => $default_dir, decoded => 1, clear_screen => 1, confirm => '-OK-', back => '<<' }
);
if ( $dir ) {
$sf->{d}{default_search_dir} = $dir;
}
return $dir;
view all matches for this distribution
view release on metacpan or search on metacpan
scripts/dex view on Meta::CPAN
}
sub _read_quoted_tokens {
my ($self, $start, $first, $yaml, $tokens) = @_;
my $quoted = '';
my $decoded = '';
my $token_name = $TOKEN_NAMES{ $first };
if ($first eq "'") {
my $regex = $REGEXES{SINGLEQUOTED};
if ($$yaml =~ s/\A($regex)//) {
$quoted .= $1;
$decoded .= $1;
$decoded =~ s/''/'/g;
}
}
else {
($quoted, $decoded) = $self->_read_doublequoted($yaml);
}
my $eol = '';
unless (length $$yaml) {
if ($quoted =~ s/($RE_WS+)\z//) {
$eol = $1;
$decoded =~ s/($eol)\z//;
}
}
my $value = { value => $decoded, orig => $quoted };
if ($$yaml =~ s/\A$first//) {
if ($start) {
push @$tokens, ( $token_name . 'D' => $value, $self->line );
}
scripts/dex view on Meta::CPAN
}
sub _read_doublequoted {
my ($self, $yaml) = @_;
my $quoted = '';
my $decoded = '';
while (1) {
my $last = 1;
if ($$yaml =~ s/\A([^"\\]+)//) {
$quoted .= $1;
$decoded .= $1;
$last = 0;
}
if ($$yaml =~ s/\A($RE_ESCAPES)//) {
$quoted .= $1;
my $dec = defined $2 ? $CONTROL{ $2 }
: defined $3 ? chr hex $3
: defined $4 ? chr hex $4
: chr hex $5;
$decoded .= $dec;
$last = 0;
}
if ($$yaml =~ s/\A(\\)\z//) {
$quoted .= $1;
$decoded .= $1;
last;
}
last if $last;
}
return ($quoted, $decoded);
}
sub _fetch_next_tokens_directive {
my ($self, $yaml, $eol) = @_;
my @tokens;
scripts/dex view on Meta::CPAN
=head1 DESCRIPTION
See <https://yaml.org/type/binary.html>
By prepending a base64 encoded binary string with the C<!!binary> tag, it can
be automatically decoded when loading.
Note that the logic for dumping is probably broken, see
L<https://github.com/perlpunk/YAML-PP-p5/issues/28>.
Suggestions welcome.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Difio/OpenShift.pm view on Meta::CPAN
if (! $response->is_success) {
die $response->status_line;
}
my $content = from_json($response->decoded_content);
print "Difio: $content->{'message'}\n";
exit $content->{'exit_code'};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Difio/dotCloud.pm view on Meta::CPAN
if (! $response->is_success) {
die $response->status_line;
}
my $content = from_json($response->decoded_content);
print "Difio: $content->{'message'}\n";
exit $content->{'exit_code'};
view all matches for this distribution
view release on metacpan or search on metacpan
- add more debug messages
0.166 2014-09-01 16:40 CEST
- Resource.pm: Unicode hell! /employee/nick/ÄÃÄa is handled correctly when
sent by browser, but incorrectly when sent via App::Dochazka::WWW - yet
the path_info string is decoded correctly in 'service_available' in both
cases! Very strange.
0.167 2014-09-04 17:34 CEST
- respect DOCHAZKA_REST_LOG_FILE and DOCHAZKA_REST_LOG_FILE_REST core/site
config parameters (as is already the case in App::Dochazka::WWW) - no
target 'current'; check for hashref instead of scalar now that we are
converting the schedule from JSON string into Perl hashref
- Model/Schedule.pm: rename 'get_json' to 'get_schedule_json' and add
'decode_schedule_json' for converting the schedule JSON string into a Perl
hashref
- Model/Shared.pm: return decoded schedule (hashref) from schedule_by_eid
- t/dispatch/schedule.t: uncomment/adapt some tests
- t/: get model units to run cleanly again
0.242 2014-11-04 08:30 CET
- config/dispatch/schedule_Config.pm: put resource definitions in alphabetical order;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Donburi/Web/Request.pm view on Meta::CPAN
sub _decode_parameters {
my ($self, $stuff) = @_;
my $encoding = 'utf-8';
my @flatten = $stuff->flatten();
my @decoded;
while ( my ($k, $v) = splice @flatten, 0, 2 ) {
push @decoded, Encode::decode($encoding, $k), Encode::decode($encoding, $v);
}
return Hash::MultiValue->new(@decoded);
}
sub parameters {
my $self = shift;
$self->env->{'donburi.request.merged'} ||= do {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/DuckPAN/Web.pm view on Meta::CPAN
p($req->as_string);
$res = $self->ua->request($req);
if ($res->is_success) {
$body = $res->decoded_content;
# Encode utf8 api_responses to bytestream for Plack.
utf8::encode $body if utf8::is_utf8 $body;
warn "Cannot use wrap_jsonp_callback and wrap_string callback at the same time!" if $wrap_jsonp_callback && $wrap_string_callback;
if ($wrap_jsonp_callback && $callback) {
$body = $callback.'('.$body.');' unless $missing_envs;
lib/App/DuckPAN/Web.pm view on Meta::CPAN
}
else {
my $res = $self->ua->request(HTTP::Request->new(GET => "http://".$hostname.$request->request_uri));
if ($res->is_success) {
$body = $res->decoded_content;
$response->code($res->code);
$response->content_type($res->content_type);
}
else {
p($res->status_line, color => { string => 'red' });
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ElasticSearch/Utilities/Connection.pm view on Meta::CPAN
my $ctype = $response->content_type() || 'invalid';
# JSON Transform
if( $ctype =~ m{^application/json\b} ) {
debug({color=>'yellow',indent=>1},"JSON Decoding Response Content");
eval {
my $decoded = decode_json( $response->content );
$response->content($decoded);
};
}
elsif ( $response->is_success && $ctype =~ m{^text/plain} ) {
# Plain text transform for the _cat API
debug({color=>'yellow',indent=>1},"Plain Text Transform Response Content");
my $decoded = [
grep { defined && length && !/^\s+$/ }
split /\r?\n/, $response->content
];
debug_var($decoded);
$response->content($decoded);
}
if( my $content = $response->content ) {
debug({color=>'yellow'}, "After translation:");
if( is_ref($content) ) {
debug_var( $content );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/EscapeUtils.pm view on Meta::CPAN
}
$SPEC{js_unescape} = {
v => 1.1,
summary => 'Interpret lines of input (in standard input or arguments) as '.
'JSON strings and return the decoded value',
args => {
%arg_strings,
},
result => {
schema => 'str*',
lib/App/EscapeUtils.pm view on Meta::CPAN
Usage:
js_unescape(%args) -> [status, msg, payload, meta]
Interpret lines of input (in standard input or arguments) as JSON strings and return the decoded value.
This function is not exported.
Arguments ('*' denotes required arguments):
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-decode.t view on Meta::CPAN
'prio' => bless( {
'pr_realtime' => bless( {}, 'App::EvalServerAdvanced::Protocol::Priority::Priority_Realtime' )
}, 'App::EvalServerAdvanced::Protocol::Priority' ),
'language' => 'perl'
}, 'App::EvalServerAdvanced::Protocol::Eval' ),
], "All packets decoded properly");
my $re_data = join '', map {encode_message("eval" => $_)} @msgs;
is($re_data, $alldata, "Re-encoded message matches original");
view all matches for this distribution
view release on metacpan or search on metacpan
0.018 - July 27th 2017
* Fix a bug where the server would drop messages if given all at once
0.017 - June 3rd 2017
* Use the file object instead of the decoded content when writing __code to /tmp
0.016 - June 3rd 2017
* Fix more utf8 related stuff
0.015 - June 2nd 2017
view all matches for this distribution
view release on metacpan or search on metacpan
share/status/app/lib/angular/angular-sanitize.js view on Meta::CPAN
var hiddenPre=document.createElement("pre");
var spaceRe = /^(\s*)([\s\S]*?)(\s*)$/;
/**
* decodes all entities into regular string
* @param value
* @returns {string} A string with decoded entities.
*/
function decodeEntities(value) {
if (!value) { return ''; }
// Note: IE8 does not preserve spaces at the start/end of innerHTML
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/Foca/Client.pm view on Meta::CPAN
my $item;
if ($data->{'got_response'}) {
my $response = $data->{'response'};
if ($response->is_success) {
my $data = $response->decoded_content;
chomp($data);
$item = {
'hostname' => $id,
'ok' => 1,
'output' => $data};
$options->{'on_good'}->($item) if
ref $options->{'on_good'} eq 'CODE';
} else {
my $msg = $response->decoded_content || $response->status_line;
chomp($msg);
if ($msg eq "500 Can't connect to $id:12346 (connect: timeout)") {
$msg = "Connect timeout";
}
$item = {
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpass-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/_genpass-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/_genpass-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/_genpass-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/_genpass-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/_genpass-id 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/_genpass-wordlist 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/_genpass-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/_genpass-wordlist 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/_genpass-wordlist 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/_genpass-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/_genpass-wordlist 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
lib/App/GitHub/FindRepository.pm view on Meta::CPAN
return sub {
my $url = shift;
my $agent = LWP::UserAgent->new;
my $response = $agent->get( $url );
die $response->status_line, "\n" unless $response->is_success;
return $response->decoded_content;
};
}
sub _get_by_curl {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/GitHub/create.pm view on Meta::CPAN
my $uri = "https://github.com/api/v2/json/repos/create";
my $response = $agent->post( $uri,
[ login => $login, token => $token, @arguments ] );
unless ( $response->is_success ) {
die $response->status_line, ": ", $response->decoded_content, "\n";
}
return $response;
}
lib/App/GitHub/create.pm view on Meta::CPAN
print $response->as_string;
eval {
no warnings;
require JSON;
my $data = JSON->new->decode( $response->decoded_content );
$_ and $owner = $_ for $data->{repository}->{owner};
};
}
print <<_END_;
view all matches for this distribution