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


EveOnline-Api

 view release on metacpan or  search on metacpan

lib/EveOnline/Api.pm  view on Meta::CPAN


        die "Error: " . $res->status_line . "\n";

    }

    my $text = $res->decoded_content;
       
    return $text;
}

1;

 view all matches for this distribution


Event-RPC

 view release on metacpan or  search on metacpan

lib/Event/RPC/Message/Negotiate.pm  view on Meta::CPAN

sub get_storable_fallback_ok    { $STORABLE_FALLBACK_OK         }
sub set_storable_fallback_ok    { $STORABLE_FALLBACK_OK = $_[1] }

sub encode_message {
    my $self = shift;
    my ($decoded) = @_;

    my $ok  = $decoded->{ok}  || "";
    my $msg = $decoded->{msg} || "";
    my $cmd = $decoded->{cmd} || "";

    s,/\d/,,g for ( $ok, $msg, $cmd );

    return "/0/E:R:M:N/1/$ok/2/$msg/3/$cmd/0/";
}

 view all matches for this distribution


Evented-API-Engine

 view release on metacpan or  search on metacpan

lib/Evented/API/Engine.pm  view on Meta::CPAN

        $api->Log($mod_name, "Load FAILED: JSON parsing of $path failed: $@");
        $api->Debug($mod_name, "JSON text: $slurp");
        return;
    }

    # JSON was decoded successfully at this point.
    # developer mode is disabled, so return the manifest.
    elsif (!$api->{developer}) {
        $use_manifest++;
    }

    # JSON was decoded successfully, but we're in developer mode.
    # check the modification times. only use the manifest if the module's
    # main package has not been modified since the manifest was written.
    else {
        my $pkg_modified = (stat "$mod_dir/$mod_last_name.pm"  )[9];
        my $man_modified = (stat "$mod_dir/$mod_last_name.json")[9];

 view all matches for this distribution


Excel-PowerPivot-Utils

 view release on metacpan or  search on metacpan

lib/Excel/PowerPivot/Utils.pm  view on Meta::CPAN

If none is supplied, a simple logger is automatically created from L<Log::Dispatch>.

=item UTF8

A boolean flag for setting the L<Win32::OLE> codepoint option to UTF8, so that
strings are properly encoded/decoded between Perl and the OLE server.
It is highly recommended to I<systematically set this option to true>, since
this module is mostly used together with L<YAML>, which uses UTF8 encoding.

This option will automatically trigger C<< Win32::OLE->Option(CP => CP_UTF8) >>
at object construction time, and will set it back to the previous value at object

 view all matches for this distribution


Excel-Writer-XLSX

 view release on metacpan or  search on metacpan

lib/Excel/Writer/XLSX/Worksheet.pm  view on Meta::CPAN

###############################################################################
#
# _get_range_data
#
# Returns a range of data from the worksheet _table to be used in chart
# cached data. Strings are returned as SST ids and decoded in the workbook.
# Return undefs for data that doesn't exist since Excel can chart series
# with data missing.
#
sub _get_range_data {

 view all matches for this distribution


Exception-Stringy

 view release on metacpan or  search on metacpan

lib/Exception/Stringy.pm  view on Meta::CPAN

  my $value = $exception->$xfield('field_name');

  $exception->$xfield(field_name => $value);

Set or get the given field. If the value contains one of the following
caracters, then it is transparently base64 encoded and decoded.

The list of forbidden caracters are:

=over

 view all matches for this distribution


Exercises-API

 view release on metacpan or  search on metacpan

lib/Exercises/API.pm  view on Meta::CPAN

}

sub _request( $self, $uri ) {
    my $response = $self->ua->get($uri);
    if ( $response->is_success ) {
        return decode_json( $response->decoded_content );
    }
    else {
        my $code = $response->code;
        confess "Exercises API status code ($code)\n"
          . "Error: "

 view all matches for this distribution


Expense-Tracker

 view release on metacpan or  search on metacpan

public/javascripts/vendor/backbone/backbone.js  view on Meta::CPAN

    // The default interval to poll for hash changes, if necessary, is
    // twenty times a second.
    interval: 50,

    // Gets the true hash value. Cannot use location.hash directly due to bug
    // in Firefox where location.hash will always be decoded.
    getHash: function(windowOverride) {
      var loc = windowOverride ? windowOverride.location : window.location;
      var match = loc.href.match(/#(.*)$/);
      return match ? match[1] : '';
    },

 view all matches for this distribution


ExtUtils-MakeMaker

 view release on metacpan or  search on metacpan

bundled/JSON-PP/JSON/PP.pm  view on Meta::CPAN


This section supposes that your perl vresion is 5.8 or later.

If you know a JSON text from an outer world - a network, a file content, and so on,
is encoded in UTF-8, you should use C<decode_json> or C<JSON> module object
with C<utf8> enable. And the decoded result will contain UNICODE characters.

  # from network
  my $json        = JSON::PP->new->utf8;
  my $json_text   = CGI->new->param( 'json_data' );
  my $perl_scalar = $json->decode( $json_text );

 view all matches for this distribution


Extism

 view release on metacpan or  search on metacpan

t/02-extism.t  view on Meta::CPAN

    ok($fplugin);
    my $hello = "Hello, World!";
    $highlevel[0] = $fplugin->call("count_vowels", $hello);
    $highlevel[1] = $fplugin->call("count_vowels", $hello);
}
my @decoded = map {decode_json $_} @highlevel;
ok($decoded[0]{count} == 3);
ok($decoded[0]{count} == $decoded[1]{count});
ok($decoded[0]{total} == 3);
ok($decoded[1]{total} == 6);

# Verify both sets of results are the same
is($highlevel[0], $lowlevel[0]);
is($highlevel[1], $lowlevel[1]);

 view all matches for this distribution


FCGI-Buffer

 view release on metacpan or  search on metacpan

t/cache.t  view on Meta::CPAN

		$h->header($key => $value);
	}
	my $r = HTTP::Response->new(200, 'OK', $h, $body);
	ok($h->content_encoding() eq 'gzip');

	$body = $r->decoded_content();
	if($^O eq 'MSWin32') {
		ok($body =~ /\\web\\English\\test4.cgi\\.+\.html"/m);
	} else {
		ok($body =~ /"\/web\/English\/test4.cgi\/.+\.html"/m);
	}

 view all matches for this distribution


FFmpeg

 view release on metacpan or  search on metacpan

ffmpeg-6036.c  view on Meta::CPAN

typedef struct AVInputStream {
    int file_index;
    int index;
    AVStream *st;
    int discard;             /* true if stream data should be discarded */
    int decoding_needed;     /* true if the packets must be decoded in 'raw_fifo' */
    int64_t sample_index;      /* current sample */

    int64_t       start;     /* time when read started */
    unsigned long frame;     /* current frame */
    int64_t       next_pts;  /* synthetic pts for cases where pkt.pts

 view all matches for this distribution


FIDO-Raw

 view release on metacpan or  search on metacpan

deps/hidapi/linux/hid.c  view on Meta::CPAN

	return ret;
}


/* Set the last global error to be reported by hid_error(NULL).
 * The given error message will be copied (and decoded according to the
 * currently locale, so do not pass in string constants).
 * The last stored global error message is freed.
 * Use register_global_error(NULL) to indicate "no error". */
static void register_global_error(const char *msg)
{

deps/hidapi/linux/hid.c  view on Meta::CPAN

	last_global_error_str = utf8_to_wchar_t(msg);
}


/* Set the last error for a device to be reported by hid_error(device).
 * The given error message will be copied (and decoded according to the
 * currently locale, so do not pass in string constants).
 * The last stored global error message is freed.
 * Use register_device_error(device, NULL) to indicate "no error". */
static void register_device_error(hid_device *dev, const char *msg)
{

 view all matches for this distribution


FLUTF

 view release on metacpan or  search on metacpan

lib/Games/Freelancer/UTF.pm  view on Meta::CPAN

	        },
	        'jc_defender.3db' => { #A model, a file can have multiple .3db (model) files in them
	            'Hardpoints' => { #The game lets you mount things on this Points
	                'Fixed' => { #Not rotatebale
	                    'HpEngine01' => {
	                        #These are just packed vectors, can be easily decoded using unpack("f*",this)
	                        'Orientation' => '��€?��������������€?��������������€?',
	                        'Position' => '����IK¿×A' #also a vector: unpack("f*",this)
	                    },
	                }
	                'Revolute' => { #For weapons mostly, follow the cursor.

 view all matches for this distribution


FU

 view release on metacpan or  search on metacpan

FU.pm  view on Meta::CPAN

  # $data = { a => .., b => .. }

  # Or, more concisely:
  my $data = fu->query(a => {anybool => 1}, b => {});

To fetch all query paramaters as decoded by C<query_decode()>, use:

  my $data = fu->query({type=>'any'});

=item fu->cookie(...)

FU.pm  view on Meta::CPAN


=item fu->json(...)

Like C<< fu->query() >> but parses the request body as JSON. Returns the raw
(unvalidated!) JSON Unicode string if no arguments are given. To retrieve the
decoded JSON data without performing further validation, use:

  my $data = fu->json({type=>'any'});

=item fu->formdata(...)

 view all matches for this distribution


FUSE-Server

 view release on metacpan or  search on metacpan

Server.pm  view on Meta::CPAN

This method starts the server listening on it's port and returns the IP which it is listening on.


=item $s->addCallback( $message, $coderef );

This method registers the referenced subroutine as a handler for the specified message. When the server receives that message from the client, it checks it's handler hash and dispatches the decoded message to the sub. The sub should handle the follow...

C<( $userid, $msg, $params )>

$userid contains the internal connection id for the client session. You can use this id to associate logins with clients. The $msg parameter contains the message the client sent. This allows one routine to handle more than one message. Messages from ...

 view all matches for this distribution


Facebook-Graph

 view release on metacpan or  search on metacpan

lib/Facebook/Graph/AccessToken/Response.pm  view on Meta::CPAN

    }
);

sub _retrieve_error_message {
    my $response = shift;
    my $content = eval { from_json($response->decoded_content) };
    if ($@) {
        return $response->message;
    }
    else {
        return $content->{error}{message};

 view all matches for this distribution


Facebook-OpenGraph

 view release on metacpan or  search on metacpan

t/003_publish/04_create_test_users.t  view on Meta::CPAN


            is $args{url}, 'https://graph.facebook.com/', 'end point';
            is $args{method}, 'POST', 'method';
            is_deeply $args{headers}, ['Authorization', 'OAuth 12345qwerty'], 'headers';
            ok $args{content}->{batch};
            my $decoded_content = decode_json($args{content}->{batch});
            my $body = +{URI->new('?'.$decoded_content->[0]->{body})->query_form};
            is_deeply $body, +{
                permissions => 'publish_actions',
                installed   => 'true',
                locale      => 'en_US',
            }, 'body';
            is $decoded_content->[0]->{relative_url}, '/1234556/accounts/test-users', 'relative_url';
            is uc $decoded_content->[0]->{method}, 'POST', 'method';
            is_deeply $args{content}->{access_token}, '12345qwerty', 'access_token';
    
            return (
                1,
                200,

 view all matches for this distribution


Fancazzista-Scrap

 view release on metacpan or  search on metacpan

lib/Fancazzista/Scrap/DevtoScrapper.pm  view on Meta::CPAN

    my $response = $ua->request($r);

    my @posts = ();

    if ( $response->is_success ) {
        my $responseContent = decode_json $response->decoded_content;
        my @children        = @{$responseContent};

        foreach (@children) {
            my $text = $_->{title};
            $text =~ s/^\s+|\s+$//g;

 view all matches for this distribution


Feed-Data

 view release on metacpan or  search on metacpan

lib/Feed/Data/Stream.pm  view on Meta::CPAN

	$req->header( 'Accept-Encoding', 'gzip' );
	my $res = $ua->request($req) or croak "Failed to fetch URI: $stream";
	if ( $res->code == 410 ) {
		croak "This feed has been permantly removed";
	}
	my $content = $res->decoded_content(charset => 'utf8');
	return \$content;
}

sub open_file {
	my ($self) = $validate->open_file->(@_);

 view all matches for this distribution


Feersum

 view release on metacpan or  search on metacpan

lib/Feersum/Connection.pm  view on Meta::CPAN


protocol (psgi SERVER_PROTOCOL)

=item C<< my $env = $req->path >>

percent decoded request path (psgi PATH_INFO)

=item C<< my $env = $req->query >>

request query (psgi QUERY_STRING)

 view all matches for this distribution


File-ANVL

 view release on metacpan or  search on metacpan

lib/File/ANVL.pm  view on Meta::CPAN

in which case they contain the line number and value, respectively. Array
element 1 always contains a string naming the format of the input, such
as, "ANVL", "JSON", "XML", etc.

The remaining triples are free form except that the values will have been
drawn from the original format and possibly decoded.  The first item
("lineno") in each remaining triple is a number followed by a character,
for example, "34:" or "6#".  The number indicates the line number (or
octet offset, depending on the origin format) of the start of the
element.  The character is either ':' to indicate a real element or '#'
to indicate a comment; if the latter, the element name has no defined

 view all matches for this distribution


File-BOM

 view release on metacpan or  search on metacpan

lib/File/BOM.pm  view on Meta::CPAN

    $enc = open_bom(my $fh, $filename, ':utf8');
    $line = <$fh>;

The filehandle will be cued up to read after the BOM. Unseekable files (e.g.
fifos) will cause croaking, unless called in list context to catch spillage
from the handle. Any spillage will be automatically decoded from the encoding,
if found.

    e.g.

    # croak if my_socket is unseekable

 view all matches for this distribution


File-CountLines

 view release on metacpan or  search on metacpan

lib/File/CountLines.pm  view on Meta::CPAN

smaller block size at all. Depending on your size a larger block size
might speed up things a bit.)

=head1 Character Encodings

If you supply a separator yourself, it should not be a decoded string.

The file is read in binary mode, which implies that this module
works fine for text files in ASCII-compatible encodings, including
ASCII itself, UTF-8 and all the ISO-8859-* encodings (aka Latin-1,
Latin-2, ...).

 view all matches for this distribution


File-Dropbox

 view release on metacpan or  search on metacpan

lib/File/Dropbox.pm  view on Meta::CPAN

	elsif ($code == 507) {
		$! = EFBIG;
	}

	else {
		die join ' ', $code, $response->decoded_content();
	}

	return 0;
} # __error__

 view all matches for this distribution


File-Find-utf8

 view release on metacpan or  search on metacpan

lib/File/Find/utf8.pm  view on Meta::CPAN

#pod C<wanted>, and C<postporcess> functions.
#pod
#pod If for any reason (e.g., compatibility with find.pl or find2perl) you
#pod also need the I<special> variables C<$File::Find::topdir>,
#pod C<$File::Find::topdev>, C<$File::Find::topino>,
#pod C<$File::Find::topmode>, and C<$File::Find::topnlink> to be decoded,
#pod specify C<local $File::Find::utf8::COMPATILBILITY = 1;> in your
#pod code. The extra decoding that needs to happen will impact performance
#pod though, so use only when absolutely necessary.
#pod
#pod =cut

lib/File/Find/utf8.pm  view on Meta::CPAN

C<wanted>, and C<postporcess> functions.

If for any reason (e.g., compatibility with find.pl or find2perl) you
also need the I<special> variables C<$File::Find::topdir>,
C<$File::Find::topdev>, C<$File::Find::topino>,
C<$File::Find::topmode>, and C<$File::Find::topnlink> to be decoded,
specify C<local $File::Find::utf8::COMPATILBILITY = 1;> in your
code. The extra decoding that needs to happen will impact performance
though, so use only when absolutely necessary.

=head2 $File::Find::utf8::UTF8_CHECK

 view all matches for this distribution


File-KDBX-XS

 view release on metacpan or  search on metacpan

libtomcrypt/src/headers/tomcrypt_private.h  view on Meta::CPAN


#ifdef LTC_PKCS_8

int pkcs8_decode_flexi(const unsigned char  *in,  unsigned long inlen,
                                    const void  *pwd, unsigned long pwdlen,
                                 ltc_asn1_list **decoded_list);

#endif  /* LTC_PKCS_8 */


#ifdef LTC_PKCS_12

 view all matches for this distribution


File-KDBX

 view release on metacpan or  search on metacpan

lib/File/KDBX/Loader/XML.pm  view on Meta::CPAN

        $value = trim($reader->getAttribute($name));
    }

    return $default if !defined $value;

    my $decoded = eval { _decode_primitive($value, $type) };
    if (my $err = $@) {
        ref $err and $err->details(attribute => $name, node => $reader->nodePath, line => $reader->lineNumber);
        throw $err
    }

    return $decoded;
}

sub _read_xml_content {
    my $self = shift;
    my $type = shift;

lib/File/KDBX/Loader/XML.pm  view on Meta::CPAN

    $reader->read if !$reader->isEmptyElement;  # step into element
    return '' if !$reader->hasValue;

    my $content = trim($reader->value);

    my $decoded = eval { _decode_primitive($content, $type) };
    if (my $err = $@) {
        ref $err and $err->details(node => $reader->nodePath, line => $reader->lineNumber);
        throw $err;
    }

    return $decoded;
}

##############################################################################

sub _decode_primitive { goto &{__PACKAGE__."::_decode_$_[1]"} }

 view all matches for this distribution


File-LoadLines

 view release on metacpan or  search on metacpan

lib/File/LoadLines.pm  view on Meta::CPAN

=head2 loadlines

    @lines = loadlines("mydata.txt");
    @lines = loadlines("mydata.txt", $options);

The file is opened, read, decoded and split into lines
that are returned in the result array. Line terminators are removed.

In scalar context, returns an array reference.

The first argument may be the name of a file, an opened file handle,

lib/File/LoadLines.pm  view on Meta::CPAN

    elsif ( $filename =~ /^https?:/ ) {
	require LWP::UserAgent;
	my $ua = LWP::UserAgent->new( timeout => 20 );
	my $res = $ua->get($filename);
	if ( $res->is_success ) {
	    $data = $res->decoded_content;
	}
	elsif ( $options->{fail} eq "soft" ) {
	    $options->{error} = $res->status_line;
	    return;
	}

 view all matches for this distribution


File-Map

 view release on metacpan or  search on metacpan

t/20-unicode.t  view on Meta::CPAN


utf8::decode($example) or die 'Can\'t decode $example';

is(warnings { utf8::decode($mapped) }, 0, 'Can decode mapped');

ok utf8::is_utf8($mapped), 'Mapped memory is decoded to characters';

is $mapped, $example, '$mapped eq $example';

for my $var (substr $mapped, 0, length $mapped) {
	is(warnings { $var = uc $var }, 0, 'Indirect capitolization gives no warnings');

t/20-unicode.t  view on Meta::CPAN


	my $utf_mapped;

	is(warnings { map_handle $utf_mapped, $fh }, 0, 'Can map utf8 handle without warnings');

	ok utf8::is_utf8($utf_mapped), 'Mapped memory is decoded to characters automatically';
}

{
	my $utf_mapped;

	is(warnings { map_file $utf_mapped, $0, '<:raw:utf8' }, 0, 'Can map utf8 file without warnings');

	ok utf8::is_utf8($utf_mapped), 'Mapped memory is decoded to characters automatically';
}

 view all matches for this distribution


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