Group
Extension

Matches 35359

Role-REST-Client-Auth-Basic ( K/KA/KAARE/Role-REST-Client-Auth-Basic-0.04.tar.gz, KAARE, 2012; MetaCPAN )
Role-REST-Client-Auth-Basic/lib/Role/REST/Client/Auth/Basic.pm ( view source; MetaCPAN )
$foo = RESTExample->new( 
		server =>      'http://localhost:3000',
		type   =>      'application/json',
		user   =>      'mee',
		passwd =>      'sekrit',
	);

	$foo->bar;

	# controller
	sub foo : L
App-combinesheets ( T/TU/TULSOFT/App-combinesheets-0.2.12.tar.gz, TULSOFT, 2012; MetaCPAN )
App-combinesheets/lib/App/combinesheets.pm ( view source; MetaCPAN )
ort.pm> is
here:

   package Airport;
   use warnings;
   use strict;

   use LWP::Simple;
   use JSON;

   # preparing a closure in order not to fetch the same airport code again and again
   my $alr
ame&fmt=json";
      my $content = get ($url);
      warn "Cannot get a response for '$url'\n"
         unless defined $content;
      my $json = JSON->new->allow_nonref;
      my $data = $json->decod
Net-API-Gett ( M/MA/MALLEN/Net-API-Gett-1.06.tar.gz, MALLEN, 2012; MetaCPAN )
Net-API-Gett/lib/Net/API/Gett/Request.pm ( view source; MetaCPAN )
package Net::API::Gett::Request;

use Moo;
use Sub::Quote;
use Carp qw(croak);
use JSON;
use LWP::UserAgent;
use HTTP::Request::Common;
use HTTP::Headers;

our $VERSION = '1.06';

=head1 NAME

Net::AP
f = shift;
    my $hr = shift;

    return encode_json($hr);
}

sub _decode {
    my $self = shift;
    my $json = shift;

    return decode_json($json);
}

sub _send {
    my $self = shift;
    my $m
e.

Input:

=over

=item * endpoint fragment

=back

Output:

=over

=item * Perl hash ref of the JSON response from the API

=back

Gives a fatal error under any error condition.

=back

=cut

sub ge
Test-BSON ( P/PA/PATCH/Test-BSON-0.01.tar.gz, PATCH, 2012; MetaCPAN )
Test-BSON/lib/Test/BSON.pm ( view source; MetaCPAN )
bson, 'BSON matches what we expected';

=head1 DESCRIPTION

BSON is a binary-encoded extension of JSON.  Test::BSON makes it easy to
verify that you have built a valid BSON document and that it matche
lid_bson> is provided as an alternative to C<bson_ok> using the same
naming convention as L<Test::JSON> but is not exported by default.

=head2 bson_is

Test passes if the two BSON documents are valid
ame naming
convention as L<Test::JSON> but is not exported by default.

=head1 SEE ALSO

This module uses L<BSON> and L<Test::Differences>, and is based on
L<Test::JSON>.  Learn more about BSON at L<h
Captcha-AreYouAHuman ( J/JO/JONATAYAH/Captcha-AreYouAHuman-0.00004.zip, JONATAYAH, 2012; MetaCPAN )
Captcha-AreYouAHuman/lib/Captcha/AreYouAHuman.pm ( view source; MetaCPAN )
nklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#

use LWP::UserAgent;
use URI::Escape;
use JSON;

# Create a new instance;
# parameters are passed with key => value
# with parameters server, pu
s->is_success) {
                # JSON decode and evaluate result
                my $results;
                eval {
                        $results = decode_json($res->content);
                };


                if ($@) {
                        $self->errorLog("Could not JSON decode: " . $res->content);
                        return 0;
                } else {
                        retur
URI ( G/GA/GAAS/URI-1.60.tar.gz, OALDERS, 2012; MetaCPAN )
URI/lib/URI.pm ( view source; MetaCPAN )
sub clone
{
    my $self = shift;
    my $other = $$self;
    bless \$other, ref $self;
}

sub TO_JSON { ${$_[0]} }

sub _no_scheme_ok { 0 }

sub _scheme
{
    my $self = shift;

    unless (@_) {
	re
Gitalist ( B/BR/BROQ/Gitalist-0.003009.tar.gz, BROQ, 2012; MetaCPAN )
Gitalist/lib/Gitalist/Controller/Fragment/Ref.pm ( view source; MetaCPAN )
:Ref
    Gitalist::URIStructure::Fragment::WithLog
/;

use File::Type::WebImages ();
use JSON::XS qw/encode_json/;

sub base : Chained('/fragment/repository/find') PathPart('') CaptureArgs(0) {}

sub 
tash->{Commit}->sha1,
       count  => 1,
       file   => $c->stash->{filename},
    );

    my $json_obj = !$commit
                 ? { }
                 : {
                     sha1    => $commi

                 };

    $c->response->content_type('application/json');
    # XXX Make use of the json branch
    $c->response->body( encode_json $json_obj );
};

__PACKAGE__->meta->make_immutable;
WWW-LogicBoxes ( D/DR/DRZIGMAN/WWW-LogicBoxes-0.0.4.tar.gz, DRZIGMAN, 2012; MetaCPAN )
WWW-LogicBoxes/lib/WWW/LogicBoxes/Types.pm ( view source; MetaCPAN )
21 C31 C32 )];
enum NexusPurpose,       [qw( P1 P2 P3 P4 P5 )];
enum ResponseType,       [qw( xml json xml_simple )];
enum VerificationStatus, [qw( Verified Pending Suspended NA )];

class_type Contac
WWW-LogicBoxes ( D/DR/DRZIGMAN/WWW-LogicBoxes-0.0.4.tar.gz, DRZIGMAN, 2012; MetaCPAN )
WWW-LogicBoxes/lib/WWW/LogicBoxes.pm ( view source; MetaCPAN )

with "WWW::LogicBoxes::Role::Commands";

# Supported Response Types:
my @response_types = qw(xml json xml_simple);
subtype "LogicBoxesResponseType"
	=> as "Str",
	=> where {
		my $type = $ARG;
		{ $t
s' API will be in.  The default is XML, all supported protocols are:

=over

=item * xml

=item * json

=item * xml_simple

=back

=head2 Suggest Domains (and many others)

	my $response = $logic_boxe
he sample URI for this request would then be:

https://test.httpapi.com/api/domains/suggest-names.json?auth-userid=0&auth-password=password&keyword=domain&tlds=com&tlds=net&no-of-results=0&hyphen-allo
Gitalist ( B/BR/BROQ/Gitalist-0.003009.tar.gz, BROQ, 2012; MetaCPAN )
Gitalist/lib/Gitalist/Controller/Root.pm ( view source; MetaCPAN )
d');
}

__PACKAGE__->config(
    default => 'text/html',
    map => {
        'application/json' => [qw/ JSON /],
        map { $_ => [qw/ View Default /] }
             qw( text/css text/html text/pl
WWW-LogicBoxes ( D/DR/DRZIGMAN/WWW-LogicBoxes-0.0.4.tar.gz, DRZIGMAN, 2012; MetaCPAN )
WWW-LogicBoxes/lib/WWW/LogicBoxes/Contact/Factory.pm ( view source; MetaCPAN )
:LogicBoxes::Contact::Factory->construct_from_response( $response );

Given a HashRef that is the JSON response from LogicBoxes when retrieving contact details, returns an instance of L<WWW::LogicBoxe
WWW-LogicBoxes ( D/DR/DRZIGMAN/WWW-LogicBoxes-0.0.4.tar.gz, DRZIGMAN, 2012; MetaCPAN )
WWW-LogicBoxes/lib/WWW/LogicBoxes/Role/Command.pm ( view source; MetaCPAN )
::Role;
use MooseX::Params::Validate;

use WWW::LogicBoxes::Types qw( HashRef Str );

use JSON qw( decode_json );

use Try::Tiny;
use Carp;

requires 'response_type';
with 'WWW::LogicBoxes::Role::Comm
our $VERSION = '1.11.0'; # VERSION
# ABSTRACT: Submission of LogicBoxes Commands

# Used to force json as the response_type and restore the existing type afterwards
around submit => sub {
    my $orig
e_type;

    my $response;
    try {
        if( $current_response_type ne 'json' ) {
            $self->response_type('json');
        }

        $response = $self->$orig( $args );
    }
    catch {
Cosmic-DB ( C/CO/COSMICNET/Cosmic-DB-0.01_05.tar.gz, COSMICNET, 2012; MetaCPAN )
Cosmic-DB/lib/Cosmic/DB/Schema.pm ( view source; MetaCPAN )
hema );

=cut

sub load {
    my $self = shift;
    $self->{schema} = $_[0];
    # TODO load from JSON, YAML, XML
    # TODO validation
    return $self;
}#sub


=item create

    my $ddl = $db_schema
Selenium-Remote-Driver ( A/AI/AIVATURI/Selenium-Remote-Driver-0.15.tar.gz, AIVATURI, 2012; MetaCPAN )
Selenium-Remote-Driver/lib/Selenium/Remote/RemoteConnection.pm ( view source; MetaCPAN )
LWP::UserAgent;
use HTTP::Headers;
use HTTP::Request;
use Net::Ping;
use Carp qw(croak);
use JSON;
use Data::Dumper;

use Selenium::Remote::ErrorHandler;

sub new {
    my ($class, $remote_
ub/$url";
    }

    if ((defined $params) && $params ne '') {
        my $json = new JSON;
        $content = $json->allow_nonref->utf8->encode($params);
    }

    # HTTP request
    my $ua
header =
      HTTP::Headers->new(Content_Type => 'application/json; charset=utf-8');
    $header->header('Accept' => 'application/json');
    my $request = HTTP::Request->new($method, $fullurl, $h
Gitalist ( B/BR/BROQ/Gitalist-0.003009.tar.gz, BROQ, 2012; MetaCPAN )
Gitalist/lib/Gitalist.pm ( view source; MetaCPAN )
       $ctx->req->uri->path("/legacy$path");
    }

    if($path =~ s/[.]json$// && $ctx->req->content_type eq 'application/json') {
        $ctx->req->uri->path($path);
    }
};

around uri_for => su
Selenium-Remote-Driver ( A/AI/AIVATURI/Selenium-Remote-Driver-0.15.tar.gz, TEODESIAN, 2012; MetaCPAN )
Selenium-Remote-Driver/lib/Selenium/Firefox/Profile.pm ( view source; MetaCPAN )
Temp;
use File::Basename qw(dirname);
use IO::Uncompress::Unzip 2.030 qw($UnzipError);
use JSON qw(decode_json);
use MIME::Base64;
use Scalar::Util qw(blessed looks_like_number);
use XML::Simple;



s
keys %prefs ) {
        my $value       = $prefs{$_};
        my $clean_value = '';

        if ( JSON::is_bool($value) ) {
            $self->set_boolean_preference( $_, $value );
            next;
 
ou can set
multiple preferences at once. If you need to set a boolean preference,
either use JSON::true/JSON::false, or see C<set_boolean_preference()>.

    $profile->set_preference("quoted.integer.p
App-Termcast ( D/DO/DOY/App-Termcast-0.12.tar.gz, DOY, 2012; MetaCPAN )
App-Termcast/lib/App/Termcast.pm ( view source; MetaCPAN )
ons for remote viewing

with 'MooseX::Getopt::Dashes';

use IO::Select;
use IO::Socket::INET;
use JSON;
use Scalar::Util 'weaken';
use Term::Filter::Callback;
use Term::ReadKey;
use Try::Tiny;



has 
m_metadata_string {
    my $self = shift;
    my %data = @_;

    my $json = JSON::encode_json(\%data);

    return "\e[H\x00$json\xff\e[H\e[2J";
}

sub _build_socket {
    my $self = shift;

    my $
Selenium-Remote-Driver ( A/AI/AIVATURI/Selenium-Remote-Driver-0.15.tar.gz, TEODESIAN, 2012; MetaCPAN )
Selenium-Remote-Driver/lib/Selenium/Remote/Spec.pm ( view source; MetaCPAN )
 for the duration of the session.
    Proxy configuration:              "proxy"                   JSON    Defines the current session’s proxy configuration.

New Stuff:

    Page load strategy:     
Resizing and Positioning Windows.
    Session timeouts configuration:   "timeouts"                JSON    Describes the timeouts imposed on certain session operations.
    Unhandled prompt behavior:  
WWW-Discogs ( M/MG/MGASEK/WWW-Discogs-0.13.tar.gz, MGASEK, 2012; MetaCPAN )
WWW-Discogs/lib/WWW/Discogs.pm ( view source; MetaCPAN )
:Discogs;

use strict;
use warnings;

use LWP::UserAgent;
use URI;
use URI::Escape;
use Carp;
use JSON::XS;
use Data::Dumper;

use 5.008;
our $VERSION = '0.13';

our @namespaces = qw ( Artist Release 
 \$query_params,
                );

            my \$json = JSON::XS::decode_json( \$res->decoded_content );
            my \$class_data = \$json->{resp}->{'$name'};
            \$class_data->{_uri} 
  \$class_data->{_params} = \$query_params;

            if (\$json->{resp}->{status} == JSON::XS::true &&
                defined \$json->{resp}->{'$name'}) {
                return $pkg->new(\%{\$cl
WWW-LogicBoxes ( D/DR/DRZIGMAN/WWW-LogicBoxes-0.0.4.tar.gz, DRZIGMAN, 2012; MetaCPAN )
WWW-LogicBoxes/lib/WWW/LogicBoxes/Role/Command/Raw.pm ( view source; MetaCPAN )
he sample URI for this request would then be:

https://test.httpapi.com/api/domains/suggest-names.json?auth-userid=0&auth-password=password&keyword=domain&tlds=com&tlds=net&no-of-results=0&hyphen-allo
check that accept the same I<key> multiple times:

https://test.httpapi.com/api/domains/available.json?auth-userid=0&auth-password=password&domain-name=domain1&domain-name=domain2&tlds=com&tlds=net

T
imes except an incrementing digit is appended:

https://test.httpapi.com/api/contacts/set-details.json?auth-userid=0&auth-password=password&contact-id=0&attr-name1=sponsor1&attr-value1=0&product-key=d

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.