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
view release on metacpan or search on metacpan
lib/Archive/BagIt.pm view on Meta::CPAN
## no critic (Variables::ProhibitMatchVars)
# the slowdown using prematch is accepatable, because only triggered in failure path
my $prematch_position = $`;
carp "possible non portable pathname detected in $dir,\n",
"got path (hexdump)='$hexdump'(hex),\n",
"decoded path='$local_entry_utf8'\n",
" "." "x length($prematch_position)."^"."------- first non portable char\n";
}
$local_entry = $local_entry_utf8;
}
return $local_entry;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Har/Entry/Response/Content.pm view on Meta::CPAN
returns the mime type of the response text. The charset attribute is included if available
=head2 text
returns the plain text response. If this field is not HTTP decoded, then the encoding field may be used
=head2 encoding
returns the encoding (such as base64) of the text field
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Libarchive/FFI.pm view on Meta::CPAN
# out of sync with the capability of the XS version, so if you need this function either use the XS version, or
# upgrade to libarchie >= 3
# archive_version_number() >= 3000000 ? 'archive_read_support_filter_program_signature' : [ archive_read_support_compression_program_signature => 'archive_read_support_filter_program_signature']);
'archive_read_support_filter_program_signature');
# this is an unusual one which doesn't need to be decoded
# because it should always be ASCII
_attach_function 'archive_entry_strmode', [ _ptr ], _str;
_attach_function 'archive_entry_linkify', [ _ptr, _ptr, _ptr ], _void, sub
{
lib/Archive/Libarchive/FFI.pm view on Meta::CPAN
use Encode qw( decode );
my $raw;
archive_read_data($archive, $raw, 10240);
my $decoded_content = decode('UTF-8', $raw);
# or
my $decoded_content = decode('KOI8-R', $raw);
=head1 SUPPORT
If you find bugs, please open an issue on the project GitHub repository:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Archive/Libarchive/XS.pm view on Meta::CPAN
use Encode qw( decode );
my $raw;
archive_read_data($archive, $raw, 10240);
my $decoded_content = decode('UTF-8', $raw);
# or
my $decoded_content = decode('KOI8-R', $raw);
=head1 SUPPORT
If you find bugs, please open an issue on the project GitHub repository:
view all matches for this distribution
view release on metacpan or search on metacpan
unzip-6.0/amiga/flate.a view on Meta::CPAN
IFGT SIZEOF_slide-4
lea redirslide(G),a0
ELSE
move.l redirslide(G),a0
ENDC
move.b d0,(a0,w.l) ; stick in the decoded byte
addq.l #1,w
cmp.l #WSIZE,w
blo main_loop
FLUSH w
ext.l d0 ; does a test as it casts long
view all matches for this distribution
view release on metacpan or search on metacpan
t/16_decrypt.t view on Meta::CPAN
is_deeply(\@mn, ["test"], "memberNames");
ok(my $m = $zip->memberNamed($mn[0]), "find member");
isa_ok($m, "Archive::Zip::Member");
is($m->password("test"), "test", "correct password");
is($m->contents, "encryption test\n" x 100, "decoded buffer");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Argon/Marshal.pm view on Meta::CPAN
use Argon::Marshal;
my $data = ['fnord'];
my $encoded = encode($data);
my $decoded = decode($encoded);
my $msg = Argon::Message->new(...);
my $encoded = encode_msg($msg);
my $decoded = decode_msg($encoded);
=head1 DESCRIPTION
Provides routines to serialize and deserialize data and L<Argon::Message>s.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ArrayData/Lingua/Word/EN/Enable.pm view on Meta::CPAN
decocting
decoction
decoctions
decocts
decode
decoded
decoder
decoders
decodes
decoding
decollate
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ArrayData/Word/EN/Enable.pm view on Meta::CPAN
decocting
decoction
decoctions
decocts
decode
decoded
decoder
decoders
decodes
decoding
decollate
view all matches for this distribution
view release on metacpan or search on metacpan
t/01_unit.t view on Meta::CPAN
);
}
};
my $resp2 = $client->item_properties( path => $path );
my $scalar = decode_json( $resp2->decoded_content );
is_deeply( $scalar->{properties}, $properties, 'properties are correct' );
my $artifact_url = "$artifactory:$port/$repository$path";
my $resp3 = $client->get($artifact_url);
is( $resp3->decoded_content, $content, 'content matches' );
};
subtest 'set_item_properties on non-existing artifact', sub {
my $client = setup();
my $properties = {
t/01_unit.t view on Meta::CPAN
'HTTP::Response'
);
};
my $resp = $client->item_properties( path => '/unique_path', properties => ['that'] );
my $scalar = decode_json( $resp->decoded_content );
is_deeply( $scalar->{properties}, { that => ['one'] }, 'property content is correct' );
};
subtest 'retrieve artifact', sub {
my $client = setup();
t/01_unit.t view on Meta::CPAN
'HTTP::Response'
);
};
my $resp = $client->retrieve_artifact('/unique_path');
is( $resp->decoded_content, $content, 'artifact retrieved successfully' );
};
subtest 'all_builds', sub {
my $client = setup();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeBarCodeCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeCellsCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeDiagramCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeEmailCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeImagingCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeOcrCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposePdfCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeSlidesCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
lib/AsposeSlidesCloud/ApiClient.pm view on Meta::CPAN
my $_response = $self->{ua}->request($_request);
unless ($_response->is_success) {
my $content = sprintf("%s", $_response->content);
croak(sprintf "API Exception(%s): %s\n%s", 401, $_response->message, $content);
}
my $decoded_data = decode_json $_response->content;
$self->{config}{access_token} = $decoded_data->{access_token};
}
if (defined $self->{config}{access_token} && $self->{config}{access_token} ne "") {
$header_params->{'Authorization'} = 'Bearer ' . $self->{config}{access_token};
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeStorageCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeTasksCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeThreeDCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
lib/AsposeWordsCloud/ApiClient.pm view on Meta::CPAN
return undef;
} elsif ( (substr($class, 0, 5)) eq 'HASH[') { #hash
if ($class =~ /^HASH\[(.*),(.*)\]$/) {
my ($key_type, $type) = ($1, $2);
my %hash;
my $decoded_data = decode_json $data;
foreach my $key (keys %$decoded_data) {
if (ref $decoded_data->{$key} eq 'HASH') {
$hash{$key} = $self->deserialize($type, encode_json $decoded_data->{$key});
} else {
$hash{$key} = $self->deserialize($type, $decoded_data->{$key});
}
}
return \%hash;
} else {
#TODO log error
view all matches for this distribution
view release on metacpan or search on metacpan
t/write_module.t view on Meta::CPAN
my $content = path($p)->slurp_raw;
write_module( $p, $paths{$p}, $tmpdir );
use_ok( $paths{$p} );
{
no strict 'refs';
eq_or_diff( ${"$paths{$p}::content"}, $content, "Loaded and decoded copy of $p" );
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/Coords/Angle.pm view on Meta::CPAN
"d", "m" or "s", "degrees" if the supplied number is greater than 2*PI
(6.28), and "radians" for all other values. Negative angles are supported.
The options for range are documented in the C<range> method.
If the angle can not be decoded (if a string), the constructor will fail.
=cut
sub new {
my $proto = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Astro/DSS/JPEG.pm view on Meta::CPAN
}
my $res = $self->_get_dss(_process_options(%opts));
if ($res->is_success) {
return $res if $opts{filename};
return $res->decoded_content;
} else {
die "*ERROR* Could not access DSS at: ".$res->request->uri
."\nHTTP Response:\n".$res->status_line;
}
}
lib/Astro/DSS/JPEG.pm view on Meta::CPAN
my $res = $self->{ua}->get(
$self->{simbad_url}."?output.format=ASCII&Ident=".$opts{target}
);
if ($res->is_success) {
my $simbad = $res->decoded_content;
if ($simbad =~ /\(ICRS,ep=J2000,eq=2000\): (\S+ \S+ \S+)\s+(\S+ \S+ \S+)/) {
$opts{ra} = $1;
$opts{dec} = $2;
} else {
die "*ERROR* Could not parse SIMBAD output:\n$simbad";
view all matches for this distribution