Result:
found more than 953 distributions - search limited to the first 2001 files matching your query ( run in 0.398 )


Archive-BagIt

 view release on metacpan or  search on metacpan

lib/Archive/BagIt.pm  view on Meta::CPAN

            my $hexdump = "0x" . unpack('H*', $local_entry);
            $local_entry =~m/[^a-zA-Z0-9._-]/; # to find PREMATCH, needed nextline
            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


Archive-Har

 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


Archive-Libarchive-FFI

 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


Archive-Libarchive-XS

 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


Archive-Unzip-Burst

 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


Archive-Zip

 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


Argon

 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




Artifactory-Client

 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


AsposeBarCodeCloud-BarcodeApi

 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


AsposeCellsCloud-CellsApi

 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


AsposeDiagramCloud-DiagramApi

 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


AsposeEmailCloud-EmailApi

 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


AsposeImagingCloud-ImagingApi

 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


AsposeOcrCloud-OcrApi

 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


AsposePdfCloud-PdfApi

 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


AsposeSlidesCloud-SlidesApi

 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


AsposeStorageCloud-StorageApi

 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


AsposeTasksCloud-TasksApi

 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


AsposeThreeDCloud-ThreeDCloudApi

 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


AsposeWordsCloud-WordsApi

 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


Asset-Pack

 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


Astro-Coords

 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


Astro-DSS-JPEG

 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


Astro-PAL

 view release on metacpan or  search on metacpan

palsrc/palDfltin.c  view on Meta::CPAN

*     void palDfltin( const char * string, int *nstrt,
*                     double *dreslt, int *jflag );

*  Arguments:
*     string = const char * (Given)
*        String containing number to be decoded.
*     nstrt = int * (Given and Returned)
*        Character number indicating where decoding should start.
*        On output its value is updated to be the location of the
*        possible next value. For compatibility with SLA the first
*        character is index 1.

 view all matches for this distribution


Astro-SpaceTrack

 view release on metacpan or  search on metacpan

inc/Mock/LWP/UserAgent.pm  view on Meta::CPAN

The canned response file is a JSON representaton of a hash keyed by URL
and, within URL, by HTTP method (C<GET>, C<POST>, and so on). The actual
responses are four-element arrays that constitute the arguments to
C<< HTTP::Response->new() >>.

Assuming the given file can be opened, read, and decoded, any request
will be satisfied by an L<HTTP::Response|HTTP::Response> object
generated from the data in the file. If the URL and method do not appear
in the file, a 404 response is generated.

=head1 METHODS

inc/Mock/LWP/UserAgent.pm  view on Meta::CPAN


=head2 __load_data

This subroutine loads data from a JSON file and returns a reference to a
two-element hash. Key C<{path}> contains the path to the file, and key
C<{data}> contains the data in the file, after it has been decoded from
JSON.

The path to the file comes from
C<$Mock::LWP::UserAgent::CANNED_DATA_FILE>. If that is C<undef> (which
it is by default), F<t/data/Mock-LWP-UserAgent/resp.json> is read.

 view all matches for this distribution


Astro-satpass

 view release on metacpan or  search on metacpan

lib/Astro/Coord/ECI/TLE.pm  view on Meta::CPAN


Users of JSON functionality (if any!) should be aware of a potential
problem in the way L<JSON::XS|JSON::XS> encodes numbers. The problem
basically is that the locale leaks into the encoded JSON, and if the
locale uses commas for decimal points the encoded JSON can not be
decoded. As I understand the discussion on the associated Perl ticket
the problem has always been there, but changes introduced in Perl 5.19.8
made it more likely to manifest.

Unfortunately the nature of the JSON interface is such that I have no
control over the issue, since the workaround needs to be applied at the

lib/Astro/Coord/ECI/TLE.pm  view on Meta::CPAN


The default is 1 (i.e. true).

=item bstardrag (numeric, parse)

This attribute contains the B* drag term, decoded into a number.

=item classification (string, parse)

This attribute contains the security classification. You should
expect to see only the value 'U', for 'Unclassified.'

 view all matches for this distribution


Attean

 view release on metacpan or  search on metacpan

lib/Attean/API/Model.pm  view on Meta::CPAN

			if ($resp->is_success) {
				my $ct		= $resp->header('Content-Type');
				my $pclass = Attean->get_parser( media_type => $ct, filename => $url ) // Attean->get_parser('ntriples');
				if ($pclass) {
					my $p		= $pclass->new(base => iri($url));
					my $str		= $resp->decoded_content;
					my $bytes	= encode('UTF-8', $str, Encode::FB_CROAK);
					my $iter	= eval { $p->parse_iter_from_bytes( $bytes ) };
					if ($@) {
						die "Failed to parse URL $url: $@";
					}

 view all matches for this distribution


Audio-Digest-MP3

 view release on metacpan or  search on metacpan

lib/Audio/Digest/MP3.pm  view on Meta::CPAN

Sometimes you want to know if you have duplicate MP3 files on your disks. But
as soon as you start editing the ID3 tags, the file contents changes, and you
can no longer trust a plain MD5 checksum on the file, nor the file size, to
compare them.

This module scans the MP3 file, only including the audio stream (undecoded!) to
calculate the message digest.

While it scans, it compiles more metadata about the file, such as playing time,
either in seconds or as formatted string, bitrate (in kbits/sec), stream size
in bytes, and whether the file is a CBR or a VBR file.

 view all matches for this distribution


( run in 0.398 second using v1.01-cache-2.11-cpan-26ccb49234f )