Group
Extension

Matches 35358

AnyEvent-CouchDB ( B/BE/BEPPU/AnyEvent-CouchDB-1.30.tar.gz, BEPPU, 2012; MetaCPAN )
AnyEvent-CouchDB/lib/AnyEvent/CouchDB/Stream.pm ( view source; MetaCPAN )
t::CouchDB::Stream;

use strict;
use warnings;
use URI;
use AnyEvent::HTTP;
use Scalar::Util;
use JSON;
use Try::Tiny;
use MIME::Base64;

our $VERSION = '0.02';

sub new {
    my $class        = shift
sub { };
    my $headers      = delete $args{headers}
        || { 'Content-Type' => 'application/json' };
    my $include_docs = delete $args{include_docs};

    my $uri = URI->new($server);
    $uri
e, $json ) = @_;
                        $set_timeout->();
                        if ($json) {
                            try {
                              $on_change->(JSON::decode_json($json));
AnyEvent-CouchDB ( B/BE/BEPPU/AnyEvent-CouchDB-1.30.tar.gz, BEPPU, 2012; MetaCPAN )
AnyEvent-CouchDB/lib/AnyEvent/CouchDB/Exceptions.pm ( view source; MetaCPAN )
ders', 'body' ],
  },
  'AnyEvent::CouchDB::Exception::JSONError' => {
    isa         => 'AnyEvent::CouchDB::Exception',
    description => 'JSON decoding error',
  },
  'AnyEvent::CouchDB::Exception
      # handle an HTTP error
    }
    when (ref eq 'AnyEvent::CouchDB::Exception::JSONError') {
      # handle a JSON decoding error
    }
    default {
      $_->show_trace(1);
      warn "$_";
    
chDB::Exception for HTTP errors

=item AnyEvent::CouchDB::Exception::JSONError

A subclass of AnyEvent::CouchDB::Exception for JSON decoding errors

=back


=head1 API

This module provides the follow
WWW-LinkChecker-Internal ( S/SH/SHLOMIF/WWW-LinkChecker-Internal-v0.0.3.tar.gz, SHLOMIF, 2012; MetaCPAN )
WWW-LinkChecker-Internal/lib/WWW/LinkChecker/Internal/API/Worker.pm ( view source; MetaCPAN )
014;

use Moo;

use Heap::Elem::Str qw( StrElem );
use Heap::Fibonacci ();
use JSON::MaybeXS   qw( decode_json encode_json );
use List::Util 1.34 qw/ any none /;

use Path::Tiny qw/ path /;

use WWW::
_url || $base_url );

    my $state =
        +( $state_fn && ( -e $state_fn ) )
        ? decode_json( path($state_fn)->slurp_utf8 )
        : {
        stack            => scalar( Heap::Fibonacci->n
rec);
            if ($state_fn)
            {
                path($state_fn)->spew_utf8( encode_json($state) );
            }
            my $from = ( $encountered_urls->{$dest_url} // "START" );
  
System-Introspector ( P/PH/PHAYLON/System-Introspector-0.001_001.tar.gz, PHAYLON, 2012; MetaCPAN )
System-Introspector/lib/System/Introspector/State.pm ( view source; MetaCPAN )
use System::Introspector::Gatherer;
use Object::Remote::Future qw( await_all );

use JSON::Diffable qw( encode_json );

has config => (is => 'ro', required => 1);

has root => (is => 'ro', required =>
     my @files;
        for my $class (sort keys %$gathered) {
            my $file = sprintf '%s.json', join '/',
                map lc, map {
                    s{([a-z0-9])([A-Z])}{${1}_${2}}g;
 
storage->file($file);
            $self->_log("Writing $full_path");
            print $fh encode_json($gathered->{$class});
            push @files, $full_path;
        }
        $self->_cleanup($sto
Expense-Tracker ( T/TC/TCONST/Expense-Tracker-0.008.tar.gz, TCONST, 2012; MetaCPAN )
Expense-Tracker/lib/ExpenseTracker/Controllers/User.pm ( view source; MetaCPAN )
ault update method
=cut
sub update{
  my $self = shift;
  
  return $self->render(status => 405,  json => {message => 'You can only update your own profile!!!'} )
    if ( !defined $self->param('id') 
System-Introspector ( P/PH/PHAYLON/System-Introspector-0.001_001.tar.gz, PHAYLON, 2012; MetaCPAN )
System-Introspector/lib/System/Introspector.pm ( view source; MetaCPAN )
t of probes
on the remote system that gather specific information. Gathered results
are stored in JSON format.

=head1 AUTHOR

 phaylon - Robert Sedlacek (cpan:PHAYLON) <r.sedlacek@shadowcat.co.uk>

=
MooseX-Semantic ( K/KB/KBA/MooseX-Semantic-0.006.tar.gz, KBA, 2012; MetaCPAN )
MooseX-Semantic/lib/MooseX/Semantic/Role/RdfExport.pm ( view source; MetaCPAN )
model = RDF::Trine::Model->temporary_model;
    my $content_type_mapping = {
        'application/json' => sub {$self->export_to_hash(%opts)},
        'application/rdf+xml' => sub {$self->export_to_st
AnyEvent-CouchDB ( B/BE/BEPPU/AnyEvent-CouchDB-1.30.tar.gz, BEPPU, 2012; MetaCPAN )
AnyEvent-CouchDB/lib/AnyEvent/CouchDB/Database.pm ( view source; MetaCPAN )
';
use JSON;
use AnyEvent::HTTP;
use AnyEvent::CouchDB::Exceptions;
use Data::Dump::Streamer;
use URI::Escape qw( uri_escape uri_escape_utf8 );
use IO::All;
use MIME::Base64;

our $default_json;

# ma
:cvcb;
*default_json   = *AnyEvent::CouchDB::default_json;
*_build_headers = *AnyEvent::CouchDB::_build_headers;

our $query = sub {
  my $options = shift;
  my $json    = $default_json;
  my @buf;
  
 $name eq 'startkey' || $name eq 'endkey') {
        $value = ref($value)
          ? uri_escape($json->encode($value))
          : (defined $value)
            ? uri_escape_utf8(qq{"$value"})
       
Clustericious-Config ( B/BD/BDUGGAN/Clustericious-Config-0.12.tar.gz, BDUGGAN, 2012; MetaCPAN )
Clustericious-Config/lib/Clustericious/Config.pm ( view source; MetaCPAN )
=head1 DESCRIPTION

Clustericious::Config reads configuration files which are Mojo::Template's
of JSON or YAML files.  There should generally be an entry for
'url', which may be used by either a clien
ding on
how this node in the cluster is being used.

After rendering the template and parsing the JSON, the resulting
object may be called using method calls or treated as hashes.

Config files are lo
re may be overridden.

YAML config files must begin with "---", otherwise they are interpreted
as JSON.

Clustericious::Config provides a "get_password" function which will prompt
for a password if it
Expense-Tracker ( T/TC/TCONST/Expense-Tracker-0.008.tar.gz, TCONST, 2012; MetaCPAN )
Expense-Tracker/lib/ExpenseTracker/Controllers/Category.pm ( view source; MetaCPAN )
ory';

  return $obj;
  
}

sub show{
  my $self = shift;

  return $self->render(status => 405,  json => {message => 'You can only see your own categories!!!'} )
    if ( !defined $self->param('id') 
urn $self->render_json( $result );
}


=head update
  sample of overriding a default update method
=cut
sub update{
  my $self = shift;
  
  return $self->render(status => 405,  json => {message => 'Y
      };
   }
  return $self->render_not_found() if scalar @$result == 0 ;
  return $self->render_json( $result );
  
}

1;

__END__
=pod
 
=head1 NAME
ExpenseTracker::Controllers::Category - Controll
AnyEvent-CouchDB ( B/BE/BEPPU/AnyEvent-CouchDB-1.30.tar.gz, BEPPU, 2012; MetaCPAN )
AnyEvent-CouchDB/lib/AnyEvent/CouchDB.pm ( view source; MetaCPAN )
package AnyEvent::CouchDB;

use strict;
use warnings;
our $VERSION = '1.30';

use JSON;
use AnyEvent::HTTP;
use AnyEvent::CouchDB::Database;
use AnyEvent::CouchDB::Exceptions;
use URI;
use URI::Escape
 "AnyEvent::CouchDB::Exception::HTTPError";
our $JSONError = "AnyEvent::CouchDB::Exception::JSONError";

# default JSON encoder
our $default_json = JSON->new->utf8;

# arbitrary uri support
sub _build
 }
  elsif ( !exists $headers->{'Content-Type'} ) {
    $headers->{'Content-Type'} = 'application/json';
  }

  if ( exists $self->{http_auth} ) {
    $headers->{'Authorization'} = $self->{http_auth};
Net-GoogleDrive ( B/BP/BPMEDLEY/Net-GoogleDrive-0.02.tar.gz, BPMEDLEY, 2012; MetaCPAN )
Net-GoogleDrive/lib/Net/GoogleDrive.pm ( view source; MetaCPAN )
package Net::GoogleDrive;

use common::sense;
use JSON;
use Mouse;
use LWP::UserAgent;
use HTTP::Request::Common;
use URI;

=head1 NAME

Net::GoogleDrive - A Google Drive API interface

=head1 VERSION
->ua();
    my $res = $ua->request($req);

    if ($res->is_success()) {
        my $token = JSON::from_json($res->content());
        $self->access_token($token->{access_token});

        print "Got 
nt wrong: ".$res->status_line();
    }
}

=head2 files

This returns a files Resource object from JSON.

=cut

sub files
{
    my $self = shift;

    my $req = HTTP::Request->new(
        GET => 'http
App-GitHub ( W/WO/WORR/App-GitHub-1.0.1.tar.gz, WORR, 2012; MetaCPAN )
App-GitHub/lib/App/GitHub.pm ( view source; MetaCPAN )
b Command Tools

use Carp;
use Moose;
use Net::GitHub;
use Term::ReadKey;
use Term::ReadLine;
use JSON::XS;
use IPC::Cmd qw/can_run/;

our $VERSION = '1.0.1';

has 'term' => (
    is       => 'rw',
  
c2(@args);

        # o.blob return plain text
        if ( ref $result ) {
            $result = JSON::XS->new->utf8->pretty->encode($result);
        }
        $self->print($result);
    };

    if 
Bio-KBase ( R/RD/RDO/Bio-KBase-0.06.tar.gz, RDO, 2012; MetaCPAN )
Bio-KBase/lib/Bio/KBase/InvocationService/Client.pm ( view source; MetaCPAN )
package Bio::KBase::InvocationService::Client;

use JSON::RPC::Client;
use strict;
use Data::Dumper;
use URI;
use Bio::KBase::Exceptions;

=head1 NAME

Bio::KBase::InvocationService::Client

=head1 DE
rams => \@args,
    });
    if ($result) {
	if ($result->is_error) {
	    Bio::KBase::Exceptions::JSONRPC->throw(error => $result->error_message,
					       code => $result->content->{code},
					   
rams => \@args,
    });
    if ($result) {
	if ($result->is_error) {
	    Bio::KBase::Exceptions::JSONRPC->throw(error => $result->error_message,
					       code => $result->content->{code},
					   
Bio-KBase ( R/RD/RDO/Bio-KBase-0.06.tar.gz, RDO, 2012; MetaCPAN )
Bio-KBase/lib/Bio/KBase/IDServer/Client.pm ( view source; MetaCPAN )
JSON::RPC::Client;
use strict;
use Data::Dumper;
use URI;

=head1 NAME

Bio::KBase::IDServer::Client

=head1 DESCRIPTION



=cut

sub new
{
    my($class, $url) = @_;

    my $self = {
	client => JSON
Dancer-Plugin-Resource ( M/MA/MATTP/Dancer-Plugin-Resource-1.122280.tar.gz, MATTP, 2012; MetaCPAN )
Dancer-Plugin-Resource/lib/Dancer/Plugin/Resource.pm ( view source; MetaCPAN )
;
use Lingua::EN::Inflect::Number;

our $RESOURCE_DEBUG = 0;

my $content_types = {
    json => 'application/json',
    yml  => 'text/x-yaml',
    xml  => 'application/xml',
};

my %routes;

# thanks 
(
        ($conf && exists $conf->{serializers})
        ? $conf->{serializers}
        : { 'json' => 'JSON',
            'yml'  => 'YAML',
            'xml'  => 'XML',
            'dump' => 'Dumper',

        User->find(params->{user_id});
        ...
    }

    # curl http://mywebservice/user/42.json
    { "id": 42, "name": "John Foo", email: "john.foo@example.com"}

    # curl http://mywebservic
DBIx-Wrapper ( D/DO/DOWENS/DBIx-Wrapper-0.29.tar.gz, DOWENS, 2012; MetaCPAN )
DBIx-Wrapper/lib/DBIx/Wrapper.pm ( view source; MetaCPAN )
pod

=head3 C<to_json($data)>

Returns the JSON representation of C<$data> (arbitrary
datastructure -- but not objects).  See http://www.json.org/ or
http://en.wikipedia.org/wiki/JSON for details.  In
 to_json {
    my $self = shift;
    my $data = shift;

    return 'null' unless defined $data;
    
    my $type = reftype($data);
    unless (defined($type)) {
        return $self->_escape_json_str
n(',', map { $self->to_json($_) } @$data) . ']';
    }
    elsif ($type eq 'HASH') {
        my @keys = sort keys %$data;
        return '{' . join(',', map { $self->_escape_json_str($_) . ':'
       
Bio-KBase ( R/RD/RDO/Bio-KBase-0.06.tar.gz, RDO, 2012; MetaCPAN )
Bio-KBase/lib/Bio/KBase/CDMI/Client.pm ( view source; MetaCPAN )
package Bio::KBase::CDMI::Client;

use JSON::RPC::Client;
use strict;
use Data::Dumper;
use URI;
use Bio::KBase::Exceptions;

=head1 NAME

Bio::KBase::CDMI::Client

=head1 DESCRIPTION



=cut

sub new
rams => \@args,
    });
    if ($result) {
	if ($result->is_error) {
	    Bio::KBase::Exceptions::JSONRPC->throw(error => $result->error_message,
					       code => $result->content->{code},
					   
rams => \@args,
    });
    if ($result) {
	if ($result->is_error) {
	    Bio::KBase::Exceptions::JSONRPC->throw(error => $result->error_message,
					       code => $result->content->{code},
					   
Bio-KBase ( R/RD/RDO/Bio-KBase-0.06.tar.gz, RDO, 2012; MetaCPAN )
Bio-KBase/lib/Bio/KBase/CDMI/CDMI_APIImpl.pm ( view source; MetaCPAN )
-sapObj} = SAPserver->new();
	}
	else
	{
	    use JSON::XS;
	    open(CONTIGS,"<$g") || die "$g is not a file that can be opened";
	    my $json = JSON::XS->new;
	    my $input_genome;
	    local $/;
	    undef $/;
	    my $input_genome_txt = <CONTIGS>;
	    $input_genome = $json->decode($input_genome_txt);
	    my $tmp = $input_genome->{contigs};
	    my @raw_contigs = map { [$_->{id},'',$_->{dna
Bio-KBase ( R/RD/RDO/Bio-KBase-0.06.tar.gz, RDO, 2012; MetaCPAN )
Bio-KBase/lib/Bio/KBase/GenomeAnnotation/Client.pm ( view source; MetaCPAN )
package Bio::KBase::GenomeAnnotation::Client;

use JSON::RPC::Client;
use strict;
use Data::Dumper;
use URI;
use Bio::KBase::Exceptions;

=head1 NAME

Bio::KBase::GenomeAnnotation::Client

=head1 DESC
rams => \@args,
    });
    if ($result) {
	if ($result->is_error) {
	    Bio::KBase::Exceptions::JSONRPC->throw(error => $result->error_message,
					       code => $result->content->{code},
					   
rams => \@args,
    });
    if ($result) {
	if ($result->is_error) {
	    Bio::KBase::Exceptions::JSONRPC->throw(error => $result->error_message,
					       code => $result->content->{code},
					   

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