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


Catmandu-RKD

 view release on metacpan or  search on metacpan

lib/Catmandu/RKD/API/Search.pm  view on Meta::CPAN

    } else {
        $url = $self->url;
    }
    my $response = $self->engine->get($url);
    if ($response->is_success) {
        return $response->decoded_content;
    } else {
        Catmandu::HTTPError->throw({
                code             => $response->code,
                message          => $response->status_line,
                url              => $response->request->uri,
                method           => $response->request->method,
                request_headers  => [],
                request_body     => $response->request->decoded_content,
                response_headers => [],
                response_body    => $response->decoded_content,
            });
        return undef;
    }
}

 view all matches for this distribution


Catmandu-Resolver

 view release on metacpan or  search on metacpan

lib/Catmandu/Store/Resolver/API.pm  view on Meta::CPAN

            code             => $response->code,
            message          => $response->status_line,
            url              => $response->request->uri,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content
        });
        return undef;
    }
}

lib/Catmandu/Store/Resolver/API.pm  view on Meta::CPAN

            code             => $response->code,
            message          => $response->status_line,
            url              => $response->request->uri,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content
        });
        return undef;
    }
}

lib/Catmandu/Store/Resolver/API.pm  view on Meta::CPAN


    my $response = $self->ua->get($req_url);

    if ($response->is_success) {
        # New API
        return decode_json($response->decoded_content);
    } else {
        # If it is 404, it could be that the "new" api works,
        # but that the entity doesn't exist. So we check for
        # the presence of the error "Entity not found"
        # Also, the new API returns the application/json content-type

lib/Catmandu/Store/Resolver/API.pm  view on Meta::CPAN

        # is not equal to the PID
        $url = '%s/resolver/api/entity/%s';
        $req_url = sprintf($url, $self->url, $id);
        $response = $self->ua->get($req_url);
        if ($response->is_success) {
            return decode_json($response->decoded_content);
        } elsif ($response->code == 404) {
            return {
                'data' => {}
            };
        } else {

lib/Catmandu/Store/Resolver/API.pm  view on Meta::CPAN

                code             => $response->code,
                message          => $response->status_line,
                url              => $response->request->uri,
                method           => $response->request->method,
                request_headers  => [],
                request_body     => $response->request->decoded_content,
                response_headers => [],
                response_body    => $response->decoded_content
            });
            return undef;
        }
    }
}

lib/Catmandu/Store/Resolver/API.pm  view on Meta::CPAN

    $self->ua->cookie_jar($self->login());

    my $response = $self->ua->post($req_url, Content_Type => 'application/json', Content => $json_data);

    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } else {
        Catmandu::HTTPError->throw({
                code             => $response->code,
                message          => $response->status_line,
                url              => $response->request->uri,
                method           => $response->request->method,
                request_headers  => [],
                request_body     => $response->request->decoded_content,
                response_headers => [],
                response_body    => $response->decoded_content
            });
        return undef;
    }

}

lib/Catmandu/Store/Resolver/API.pm  view on Meta::CPAN

    $self->ua->cookie_jar($self->login());

    my $response = $self->ua->put($req_url, Content_Type => 'application/json', Content => $json_data);

    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } else {
        Catmandu::HTTPError->throw({
                code             => $response->code,
                message          => $response->status_line,
                url              => $response->request->uri,
                method           => $response->request->method,
                request_headers  => [],
                request_body     => $response->request->decoded_content,
                response_headers => [],
                response_body    => $response->decoded_content
            });
        return undef;
    }
}

lib/Catmandu/Store/Resolver/API.pm  view on Meta::CPAN

    $self->ua->cookie_jar($self->login());

    my $response = $self->ua->delete($req_url);

    if ($response->is_success) {
        return $response->decoded_content;
    } else {
        Catmandu::HTTPError->throw({
                code             => $response->code,
                message          => $response->status_line,
                url              => $response->request->uri,
                method           => $response->request->method,
                request_headers  => [],
                request_body     => $response->request->decoded_content,
                response_headers => [],
                response_body    => $response->decoded_content
            });
        return undef;
    }
}

 view all matches for this distribution


Catmandu-Store-AAT

 view release on metacpan or  search on metacpan

lib/Catmandu/Store/AAT/SPARQL.pm  view on Meta::CPAN

    my $form = {
        'query' => $self->query
    };
    my $response = $self->ua->post($self->url, $form);
    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } else {
         Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $response->status_line,
            url              => $response->request->uri,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content
        });
        return undef;
    }
}

 view all matches for this distribution


Catmandu-Store-Datahub

 view release on metacpan or  search on metacpan

lib/Catmandu/Store/Datahub/API.pm  view on Meta::CPAN

    my $url = sprintf('%s/api/v1/data/%s', $self->url, $id);

    my $response = $self->client->get($url, Authorization => sprintf('Bearer %s', $self->access_token));

    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } elsif ($response->code == 401) {
        my $error = decode_json($response->decoded_content);
        if ($error->{'error_description'} eq 'The access token provided has expired.') {
            $self->set_access_token();
            return $self->get($id);
        }
    } elsif ($response->code == 404) {
        return {};
    } else {
        my $message = decode_json($response->decoded_content);
        Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $message->{error}->{msg},
            url              => $response->request->uri->as_string,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content,
        });
        return undef;
    }
}

lib/Catmandu/Store/Datahub/API.pm  view on Meta::CPAN

    my $response;

    $response = $self->client->post($url, Content_Type => 'application/lido+xml', Authorization => sprintf('Bearer %s', $token), Content => $data);

    if ($response->is_success) {
        return $response->decoded_content;
    } elsif ($response->code == 401) {
        my $error = decode_json($response->decoded_content);
        if ($error->{'error_description'} eq 'The access token provided has expired.') {
            $self->set_access_token();
            return $self->add($data);
        }
    } else {
        my $message = decode_json($response->decoded_content);
        Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $message->{error}->{msg},
            url              => $response->request->uri->as_string,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content,
        });
        return undef;
    }
}

lib/Catmandu/Store/Datahub/API.pm  view on Meta::CPAN

    my $response;

    $response = $self->client->put($url, Content_Type => 'application/lido+xml', Authorization => sprintf('Bearer %s', $token), Content => $data);

    if ($response->is_success) {
        return $response->decoded_content;
    } elsif ($response->code == 401) {
        my $error = decode_json($response->decoded_content);
        if ($error->{'error_description'} eq 'The access token provided has expired.') {
            $self->set_access_token();
            return $self->update($id, $data);
        }
    } else {
        my $message = decode_json($response->decoded_content);
        Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $message->{error}->{msg},
            url              => $response->request->uri->as_string,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content,
        });
        return undef;
    }
}

lib/Catmandu/Store/Datahub/API.pm  view on Meta::CPAN

    my $response;

    $response = $self->client->delete($url, Authorization => sprintf('Bearer %s', $token));

    if ($response->is_success) {
        return $response->decoded_content;
    } elsif ($response->code == 401) {
        my $error = decode_json($response->decoded_content);
        if ($error->{'error_description'} eq 'The access token provided has expired.') {
            $self->set_access_token();
            return $self->delete($id);
        }
    } else {
        my $message = decode_json($response->decoded_content);
        Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $message->{error}->{msg},
            url              => $response->request->uri->as_string,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content,
        });
        return undef;
    }
}

lib/Catmandu/Store/Datahub/API.pm  view on Meta::CPAN


    my $token = $self->access_token;
    my $response = $self->client->get($url, Authorization => sprintf('Bearer %s', $token));

    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } else {
        my $message = decode_json($response->decoded_content);
        Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $message->{error}->{msg},
            url              => $response->request->uri->as_string,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content,
        });
        return undef;
    }
}

 view all matches for this distribution


Catmandu-Store-REST

 view release on metacpan or  search on metacpan

lib/Catmandu/Store/REST/API.pm  view on Meta::CPAN

    my $url = $self->mk_url($id);

    my $response = $self->client->get($url);

    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } elsif ($response->code == 404) {
        return {};
    } else {
        Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $response->status_line,
            url              => $response->request->url,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content,
        });
        return {};
    }
}

lib/Catmandu/Store/REST/API.pm  view on Meta::CPAN

    my $json_data = encode_json($data);
    
    my $response = $self->client->post($url, Content_Type => 'application/json', Content => $json_data);

    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } else {
        Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $response->status_line,
            url              => $response->request->url,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content,
        });
        return {};
    }
}

lib/Catmandu/Store/REST/API.pm  view on Meta::CPAN

    my $json_data = encode_json($data);
    
    my $response = $self->client->put($url, Content_Type => 'application/json', Content => $json_data);

    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } else {
        Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $response->status_line,
            url              => $response->request->url,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content,
        });
        return {};
    }
}

lib/Catmandu/Store/REST/API.pm  view on Meta::CPAN

    my $url = $self->mk_url($id);

    my $response = $self->client->delete($url);
    
    if ($response->is_success) {
        return decode_json($response->decoded_content);
    } else {
        Catmandu::HTTPError->throw({
            code             => $response->code,
            message          => $response->status_line,
            url              => $response->request->url,
            method           => $response->request->method,
            request_headers  => [],
            request_body     => $response->request->decoded_content,
            response_headers => [],
            response_body    => $response->decoded_content,
        });
        return {};
    }
}

 view all matches for this distribution


Catmandu-Store-RKD

 view release on metacpan or  search on metacpan

lib/Catmandu/Store/RKD/API/Search.pm  view on Meta::CPAN

    } else {
        $url = $self->url;
    }
    my $response = $self->engine->get($url);
    if ($response->is_success) {
        return $response->decoded_content;
    } else {
        Catmandu::HTTPError->throw({
                code             => $response->code,
                message          => $response->status_line,
                url              => $response->request->uri,
                method           => $response->request->method,
                request_headers  => [],
                request_body     => $response->request->decoded_content,
                response_headers => [],
                response_body    => $response->decoded_content,
            });
        return undef;
    }
}

 view all matches for this distribution


Catmandu-VIAF

 view release on metacpan or  search on metacpan

lib/Catmandu/VIAF/API/ID.pm  view on Meta::CPAN

                code             => $response->code,
                message          => $response->status_line,
                url              => $response->request->uri,
                method           => $response->request->method,
                request_headers  => [],
                request_body     => $response->request->decoded_content,
                response_headers => [],
                response_body    => $response->decoded_content
            });
            return {};
        }
    }
    my $rdf = $response->decoded_content;
    my $document = sprintf('<?xml version="1.0" encoding="UTF-8"?>%s', $rdf);
    my $parser = Catmandu::VIAF::API::Parse->new(items => $document);
    return $parser->xml();
}

 view all matches for this distribution


Chart-Plotly

 view release on metacpan or  search on metacpan

examples/bitcoin.pl  view on Meta::CPAN

    $ua->agent('Mozilla/5.0');    # LWP UserAgent banned by default... Don't shoot the messenger...
    $ua->default_header( 'Content-Type' => 'application/json' );
    my $response = $ua->get('https://api.pro.coinbase.com/products/BTC-EUR/candles');

    if ( $response->is_success() ) {
        my $data = from_json( $response->decoded_content );
        my ( @x, @open, @close, @high, @low );
        for my $candle (@$data) {
            push @x, DateTime->from_epoch( epoch => $candle->[0] );
            push @low,   $candle->[1];
            push @high,  $candle->[2];

 view all matches for this distribution


Chat-iFly

 view release on metacpan or  search on metacpan

lib/Chat/iFly.pm  view on Meta::CPAN


sub _process_response {
    my $self = shift;
    my $response = shift;
    if ($response->is_success) {
        return $response->decoded_content;
    }
    else {
        warn $response->decoded_content;
        ouch $response->code, $response->message, $response->decoded_content;
    }
}

=head1 PREREQS

 view all matches for this distribution


CheerLights-API

 view release on metacpan or  search on metacpan

CheerLights/API.pm  view on Meta::CPAN

    my ($url) = @_;
    my $ua = LWP::UserAgent->new;
    my $response = $ua->get($url);

    if ($response->is_success) {
        return $response->decoded_content;
    } else {
        warn "Failed to fetch URL: " . $response->status_line;
        return;
    }
}

 view all matches for this distribution


Chef-REST-Client

 view release on metacpan or  search on metacpan

lib/Chef/Encoder.pm  view on Meta::CPAN

returns base64 encoded value of data

=head4 B<decode>

it accepts data as parameter $obj->decode( 'data' => $data )
returns base64 decoded value of data

=cut

#-------------------------------#
#  class Chef::Encoder::base64  #

 view all matches for this distribution


Chess-PGN-Extract

 view release on metacpan or  search on metacpan

lib/Chess/PGN/Extract.pm  view on Meta::CPAN

  $out =~ s/\n//g;
  $out =~ s/}/},/g;
  chop $out;
  $out = "[" . $out . "]";

  my $decoded = try {
    decode_json ($out);
  } catch {
    croak ("JSON parse error: $out");
  };

lib/Chess/PGN/Extract.pm  view on Meta::CPAN

    else {
      my $invalid_game = dump ($_);
      STDERR->print ("Invalid PGN omitted: $invalid_game\n");
      0;
    }
  } @$decoded;

  foreach (@games) {
    delete $_->{chash};
    delete $_->{fhash};
  }

 view all matches for this distribution


Chess-Plisco

 view release on metacpan or  search on metacpan

lib/Chess/Plisco.pod  view on Meta::CPAN

Generates a string representation of all bitboards in ASCII art plus some
additional information.

=item B<dumpInfo(INFO)>

Returns a string with the decoded position information as retured by
L</info>.

=item B<movesCoordinateNotation(MOVES)>

Takes an array of moves (as integers) and converts it into an array of moves

 view all matches for this distribution


Chouette

 view release on metacpan or  search on metacpan

lib/Chouette.pm  view on Meta::CPAN


L<Chouette> is a framework for making asynchronous HTTP services. It makes some opinionated design choices, but is otherwise fairly flexible.

L<AnyEvent> is used as the glue to connect all the asynchronous libraries, although Chouette depends on L<Feersum> and therefore L<EV> for its event loop. It uses L<Feersum> in PSGI mode so it can use L<Plack> for request parsing, and has support for...

Chouette generally assumes that its input will be C<application/x-www-form-urlencoded>. L<Plack::Request::WithEncoding> is used so that text is properly decoded (we recommend UTF-8 of course). For output, the default is C<application/json> encoded wi...

Chouette apps can optionally load a config file and its format is C<YAML>, loaded with the L<YAML> module. L<Regexp::Assemble> is used for efficient route-dispatch.

The above aside, Chouette's main purpose is to glue together several of my own modules into a cohesive whole. These modules have been designed to work together and I have used them to build numerous services, some of which handle a considerable amoun...

 view all matches for this distribution


Circle-Common

 view release on metacpan or  search on metacpan

lib/Circle/Common.pm  view on Meta::CPAN

        $header = [ 'Content-Type' => 'application/json; charset=UTF-8' ];
    }
    my $request  = HTTP::Request->new( 'POST', $url, $header, encode_json($data) );
    my $response = $ua->request($request);
    if ( $response->is_success ) {
        return decode_json( $response->decoded_content );
    }
    else {
        carp 'http_json_post' . $response->status_line ? $response->status_line : 'unknown';
        return {
            status  => $response->status_line,
            message => $response->decoded_content,
        };
    }
}

sub http_json_get {

lib/Circle/Common.pm  view on Meta::CPAN

        $header = [ 'Content-Type' => 'application/json; charset=UTF-8' ];
    }
    my $request  = HTTP::Request->new( 'GET', $url, $header );
    my $response = $ua->request($request);
    if ( $response->is_success ) {
        return decode_json( $response->decoded_content );
    }
    else {
        carp 'http_json_get' . $response->status_line ? $response->status_line : 'unknown';
        return {
            status  => $response->status_line,
            message => $response->decoded_content,
        };
    }
}

sub get_host {

 view all matches for this distribution


Class-Param

 view release on metacpan or  search on metacpan

t/06-encoding.t  view on Meta::CPAN

};

isa_ok      my $p1 = Class::Param->new($params),       'Class::Param',           'Class::Param->new constructs a new instance';
isa_ok      my $p2 = Class::Param::Encoding->new($p1), 'Class::Param::Encoding', 'Class::Param::Encoding->new constructs a new instance';

is          $p2->get('A'),            "\x{263A}",                                '->get    A: returns right decoded value';
is          $p2->param('A'),          "\x{263A}",                                '->param  A: returns right decoded value';
is          $p2->get('B'),            "\x{2639}",                                '->get    B: returns right decoded value';
is          $p2->param('B'),          "\x{2639}",                                '->param  B: returns right decoded value';
is_deeply   $p2->get('C'),            [ "\x{263A}", "\x{2639}" ],                '->get    C: returns right decoded values';
is_deeply   [ $p2->param('C') ],      [ "\x{263A}", "\x{2639}" ],                '->param  C: returns right decoded values';
is          $p2->get('D'),            "\x{263A}",                                '->get    D: returns right decoded value';
is          $p2->param('D'),          "\x{263A}",                                '->param  D: returns right decoded value';

 view all matches for this distribution


Class-Usul

 view release on metacpan or  search on metacpan

lib/Class/Usul/Functions.pm  view on Meta::CPAN

Untaints directory path. Makes it an absolute path and returns it if it
exists. Returns undef otherwise

=head2 C<base64_decode_ns>

   $decoded_value = base64_decode_ns $encoded_value;

Decode a scalar value encode using L</base64_encode_ns>

=head2 C<base64_encode_ns>

 view all matches for this distribution


ClearPress

 view release on metacpan or  search on metacpan

lib/ClearPress/authenticator/session.pm  view on Meta::CPAN

}

sub decode_token {
  my ($self, $token) = @_;

  my $decoded = q[];
  eval {
    $decoded = decode_base64($token);
  } or do {
    carp q[Failed to decode token];
    return;
  };

  my $decrypted = q[];
  eval {
    $decrypted = $self->cipher->decrypt($decoded);
  } or do {
    carp q[Failed to decrypt token];
    return;
  };

 view all matches for this distribution


CloudFlare-Client

 view release on metacpan or  search on metacpan

lib/CloudFlare/Client.pm  view on Meta::CPAN

    CloudFlare::Client::Exception::Connection::->throw(
        status  => $res->status_line,
        message => 'HTTPS request failed',)
        unless $res->is_success;
    # Handle errors from CF
    Readonly my $info => decode_json($res->decoded_content);
    CloudFlare::Client::Exception::Upstream::->throw(
        errorCode => $info->{err_code},
        message   => $info->{msg},)
        unless $info->{result} eq 'success';

 view all matches for this distribution


Clustericious

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

1.19      2016-03-28 12:13:34 -0400
  - make hypnotoad test a dev only test

1.18      2016-03-24 15:49:47 -0400
  - Documentation fixes
  - Fix bug where errors from mojo were not being decoded correctly
    in PlugAuth plugin
  - make plackup test a dev only test

1.17      2016-03-14 12:18:27 -0400
  - removed stragler deprecated use of auth_ua

 view all matches for this distribution


Cmd-Dwarf

 view release on metacpan or  search on metacpan

examples/helloworld/app/lib/Dwarf/Module/SocialMedia/Amazon.pm  view on Meta::CPAN

	if ($res->code !~ /^2/) {
		$self->on_error->('Amazon OAuth Error: Could not get access token.');
		return;
	}

	my $decoded = decode_json $res->{_content};
	my $access_token = $decoded->{access_token};

	$self->access_token($access_token);
}

sub _make_request {

examples/helloworld/app/lib/Dwarf/Module/SocialMedia/Amazon.pm  view on Meta::CPAN

	return $self->validate($res);
}

sub validate {
	my ($self, $res) = @_;
	my $content = eval { decode_json($res->decoded_content) };
	if ($@) {
		warn "Couldn't decode JSON: $@";
		$content = $res->decoded_content;
	}

	# [todo] 
	# 	check error status codes

 view all matches for this distribution


CodeGen-Cpppp

 view release on metacpan or  search on metacpan

lib/CodeGen/Cpppp/CParser.pm  view on Meta::CPAN

  [ $type, $value, $offset, $length, $error=undef ]
  
  $type:   'directive', 'comment', 'string', 'char', 'real', 'integer',
           'keyword', 'ident', 'unknown', or any punctuation character
  
  $value:  for constants, this is the decoded string or numeric value
           for directives and comments, it is the body text
           for punctuation, it is a copy of $type
           for unknown, it is the exact character that didn't parse
  
  $src_pos: the character offset within the source $string

 view all matches for this distribution


Coerce-Types-Standard

 view release on metacpan or  search on metacpan

lib/Coerce/Types/Standard.pm  view on Meta::CPAN


=back

=head2 HTML

Accepts a String and coerces it into entity encoded/decoded string, the default behaviour here is to entity encode the given string.

	HTML->coerce('okay&'); 
	*-*-*-*-*-*-*
	okay&amp;

 view all matches for this distribution


CohortExplorer

 view release on metacpan or  search on metacpan

lib/CohortExplorer/Application/Opal/Datasource.pm  view on Meta::CPAN

             Accept => "application/json"
 );
 my $res  = $ua->request($req);
 my $code = $res->code;
 if ( $code == 200 ) {
  my $json = decode_json( $res->decoded_content );
  if ( $json->{type} ne 'mongodb' ) {

   # Successful authentication returns tables and views accessible to the user
   my %view = map { $_ => 1 } @{ $json->{view} || [] };
   my @tables = @{ $json->{table} || [] };

lib/CohortExplorer/Application/Opal/Datasource.pm  view on Meta::CPAN

  );
  my $entity_res = $ua->request($entity_req);

  # Get the first identifier
  if ( $entity_res->code == 200 ) {
   my $decoded_json = decode_json( $entity_res->decoded_content );
   my $var_req =
     HTTP::Request->new(   GET => $url
                         . "/ws/datasource/$ds_name/table/$t/valueSet/"
                         . ( $decoded_json->[0]->{identifier} || '' ) );
   $var_req->header(
             Authorization => "X-Opal-Auth "
               . MIME::Base64::encode( join ':', @opts{qw/username password/} ),
             Accept => "application/json"
   );
   my $var_res = $ua->request($var_req);

   # Get all variables with accessible values
   if ( $var_res->code == 200 ) {
    $decoded_json = decode_json( $var_res->decoded_content );
    push @{ $param{allowed_variables} },
      map { "$t.$_" } @{ $decoded_json->{variables} };
   }
   else {
    die "Failed to fetch variable list via $url (error "
      . $var_res->code . ")\n";
   }

 view all matches for this distribution


CommonMark

 view release on metacpan or  search on metacpan

t/03_render.t  view on Meta::CPAN


is(CommonMark->markdown_to_html("\x{263A}"), "<p>\x{263A}</p>\n",
   'render functions return encoded utf8');

is(CommonMark->markdown_to_html("\xC2\xA9"), "<p>\xC2\xA9</p>\n",
   'render functions expect decoded utf8');

 view all matches for this distribution


Compiler-Parser

 view release on metacpan or  search on metacpan

t/app/Plack/Request.t  view on Meta::CPAN


Returns the protocol (HTTP/1.0 or HTTP/1.1) used for the current request.

=item request_uri

Returns the raw, undecoded request URI path. You probably do B<NOT>
want to use this to dispatch requests.

=item path_info

Returns B<PATH_INFO> in the environment. Use this to get the local

t/app/Plack/Request.t  view on Meta::CPAN

  $req->logger->({ level => 'debug', message => "This is a debug message" });

=item cookies

Returns a reference to a hash containing the cookies. Values are
strings that are sent by clients and are URI decoded.

If there are multiple cookies with the same name in the request, this
method will ignore the duplicates and return only the first value. If
that causes issues for you, you may have to use modules like
CGI::Simple::Cookie to parse C<$request->header('Cookies')> by

t/app/Plack/Request.t  view on Meta::CPAN

Returns a L<Hash::MultiValue> hash reference containing (merged) GET
and POST parameters.

=item content, raw_body

Returns the request content in an undecoded byte string for POST requests.

=item uri

Returns an URI object for the current request. The URI is constructed
using various environment values such as C<SCRIPT_NAME>, C<PATH_INFO>,

 view all matches for this distribution


Compress-Deflate7

 view release on metacpan or  search on metacpan

7zip/C/LzmaDec.c  view on Meta::CPAN

StopCompilingDueBUG
#endif

#define LZMA_DIC_MIN (1 << 12)

/* First LZMA-symbol is always decoded.
And it decodes new LZMA-symbols while (buf < bufLimit), but "buf" is without last normalization
Out:
  Result:
    SZ_OK - OK
    SZ_ERROR_DATA - Error

 view all matches for this distribution


Compress-LZ4

 view release on metacpan or  search on metacpan

src/lz4.c  view on Meta::CPAN

        op=cpy;   /* correction */
    }

    /* end of decoding */
    if (endOnInput)
       return (int) (((char*)op)-dest);     /* Nb of output bytes decoded */
    else
       return (int) (((const char*)ip)-source);   /* Nb of input bytes read */

    /* Overflow error detected */
_output_error:

src/lz4.c  view on Meta::CPAN

}

/*!
 * LZ4_setStreamDecode() :
 * Use this function to instruct where to find the dictionary.
 * This function is not necessary if previous data is still available where it was decoded.
 * Loading a size of 0 is allowed (same effect as no dictionary).
 * Return : 1 if OK, 0 if error
 */
int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize)
{

src/lz4.c  view on Meta::CPAN

}

/*
*_continue() :
    These decoding functions allow decompression of multiple blocks in "streaming" mode.
    Previously decoded blocks must still be available at the memory position where they were decoded.
    If it's not possible, save the relevant part of decoded data into a safe buffer,
    and indicate where it stands using LZ4_setStreamDecode()
*/
int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize)
{
    LZ4_streamDecode_t_internal* lz4sd = &LZ4_streamDecode->internal_donotuse;

 view all matches for this distribution


Compress-LZ4Frame

 view release on metacpan or  search on metacpan

lz4.c  view on Meta::CPAN

        op = cpy;   /* correction */
    }

    /* end of decoding */
    if (endOnInput)
       return (int) (((char*)op)-dst);     /* Nb of output bytes decoded */
    else
       return (int) (((const char*)ip)-src);   /* Nb of input bytes read */

    /* Overflow error detected */
_output_error:

lz4.c  view on Meta::CPAN

}

/*!
 * LZ4_setStreamDecode() :
 * Use this function to instruct where to find the dictionary.
 * This function is not necessary if previous data is still available where it was decoded.
 * Loading a size of 0 is allowed (same effect as no dictionary).
 * Return : 1 if OK, 0 if error
 */
int LZ4_setStreamDecode (LZ4_streamDecode_t* LZ4_streamDecode, const char* dictionary, int dictSize)
{

lz4.c  view on Meta::CPAN

}

/*
*_continue() :
    These decoding functions allow decompression of multiple blocks in "streaming" mode.
    Previously decoded blocks must still be available at the memory position where they were decoded.
    If it's not possible, save the relevant part of decoded data into a safe buffer,
    and indicate where it stands using LZ4_setStreamDecode()
*/
LZ4_FORCE_O2_GCC_PPC64LE
int LZ4_decompress_safe_continue (LZ4_streamDecode_t* LZ4_streamDecode, const char* source, char* dest, int compressedSize, int maxOutputSize)
{

 view all matches for this distribution


Compress-PPMd

 view release on metacpan or  search on metacpan

PPMd.pm  view on Meta::CPAN

  my $encoder=Compress::PPMd::Encoder->new();
  my $encoded=$encoder->encode($text);
  my $encoded2=$encoder->encode($text2);

  my $decoder=Compress::PPMd::Decoder->new();
  my $decoded=$encoder->decode($encoded);
  my $decoded2=$encoder->decode($encoded2);


=head1 ABSTRACT

This package is a Perl wrapper around Dmitry Shkarin PPMd compression

 view all matches for this distribution


( run in 0.791 second using v1.01-cache-2.11-cpan-0a987023a57 )