Group
Extension

Matches 35358

Plack-Debugger ( S/ST/STEVAN/Plack-Debugger-0.03.tar.gz, STEVAN, 2014; MetaCPAN )
Plack-Debugger/lib/Plack/App/Debugger.pm ( view source; MetaCPAN )

use Try::Tiny;
use Scalar::Util qw[ blessed ];

use File::ShareDir;
use File::Spec::Unix ();
use JSON::XS         ();

use Plack::App::File;

use Plack::Debugger;

our $VERSION   = '0.03';
our $AUTHO
debugger';

# Be *extremely* lax about our JSON, this
# might be overkill for simple cases, but 
# for non-simple cases, it just makes sense.
our $JSON = JSON::XS
                ->new
               
c_app'} = Plack::App::File->new( root => $args{'static_asset_dir'} )->to_app;
    $args{'_JSON'}       = $JSON;

    $class->SUPER::new( %args );
}

# accessors ...

sub debugger         { (shift)->{'
Plack-Debugger ( S/ST/STEVAN/Plack-Debugger-0.03.tar.gz, STEVAN, 2014; MetaCPAN )
Plack-Debugger/lib/Plack/Debugger.pm ( view source; MetaCPAN )
k web applications

=head1 VERSION

version 0.03

=head1 SYNOPSIS

  use Plack::Builder;
  
  use JSON;
  
  use Plack::Debugger;
  use Plack::Debugger::Storage;
  
  use Plack::App::Debugger;
  
  us
panel',
          serializer   => sub { encode_json( shift ) },
          deserializer => sub { decode_json( shift ) },
          filename_fmt => "%s.json",
      ),
      panels => [
          Plack:
he necessary javascript and CSS for the debugging
UI. The second is to provide a small REST style JSON web-service that
serves up the debugging data. 

=head2 C<Plack.Debugger>

This is the javascript
Puncheur ( S/SO/SONGMU/Puncheur-v0.3.0.tar.gz, SONGMU, 2015; MetaCPAN )
Puncheur/lib/Puncheur/Plugin/HandleStatic.pm ( view source; MetaCPAN )
        my $app_name = $self->app_name;
                my $is_text = qr/\b(?:text|xml|javascript|json)\b/;
                state $cache = {};
                if ($cache->{$app_name}{$path_info}) {
  
McBain ( I/ID/IDOPEREL/McBain-2.001000.tar.gz, IDOPEREL, 2015; MetaCPAN )
McBain/lib/McBain.pm ( view source; MetaCPAN )
 L<PSGI|McBain::WithPSGI> and L<Gearman::XS|McBain::WithGearmanXS> runners,
however, are both JSON-in JSON-out interfaces.

A C<McBain> API is built of one or more B<topics>, in a hierarchical structu
in::WithPSGI> - Turn an API into a Plack based, JSON-to-JSON
RESTful web application.

=item * L<McBain::WithGearmanXS> - Turn an API into a JSON-to-JSON
Gearman worker.

=item * L<McBain::WithWebSock
t> - Turn an API into a WebSocket server.

=item * L<McBain::WithZeroMQ> - Turn an API into a JSON-to-JSON ZeroMQ REP worker.

=back

The latter four completely change the way your API is used, and ye
Plack-Debugger ( S/ST/STEVAN/Plack-Debugger-0.03.tar.gz, STEVAN, 2014; MetaCPAN )
Plack-Debugger/lib/Plack/Middleware/Debugger/Injector.pm ( view source; MetaCPAN )
 and pass them 
    # through
    return $resp;
}

sub handle_json_content_type {
    my ($self, $env, $resp) = @_;
    # application/json responses really 
    # can't get injected into so we 
    # 
 );
            } 
            elsif ( $content_type =~ m!^(?:application/json)! ) {
                return $self->handle_json_content_type( $env, $resp );
            }
            # now be less spec
ess the stream and if a closing C<<body>> tag is found, inject 
accordingly.

=item C<application/json>

While we have a specific handler for this content-type, we do not do 
anything but just let it 
WebService-Rakuten-API ( S/SU/SUENAGA/WebService-Rakuten-API-0.06.tar.gz, SUENAGA, 2015; MetaCPAN )
WebService-Rakuten-API/lib/WebService/Rakuten/API/Provider/Travel.pm ( view source; MetaCPAN )
;
  my $url = URI->new(BASEHOTELURL);
  $url->query_form(applicationId=> $context->appid,format=>'json',largeClassCode => $arg->{largeClassCode},middleClassCode=>$arg->{middleClassCode},smallClassCode
CGI-Plus ( M/MI/MIKO/CGI-Plus-0.15.tar.gz, MIKO, 2015; MetaCPAN )
CGI-Plus/lib/CGI/Plus.pod ( view source; MetaCPAN )

 $cgi->set_header('myheader', 'whatever');

 # change content type
 $cgi->set_content_type('text/json');

 # output HTTP headers, including added cookies, the CSRF cookie,
 # and the new header
 prin
GgpkZ4; path=/
 # Date: Sun, 29 Jul 2012 04:08:06 GMT
 # Myheader: whatever
 # Content-Type: text/json; charset=ISO-8859-1

=head1 INSTALLATION

CGI::Plus can be installed with the usual routine:

 pe
tntcompat ( U/UN/UNERA/tntcompat-0.4.tar.gz, UNERA, 2014; MetaCPAN )
tntcompat/lib/TntCompat/Server.pm ( view source; MetaCPAN )
tfile';

use TntCompat::Cat::SnapMsgpack;
use TntCompat::Cat::Snap;
use TntCompat::Cat::Xlog;
use JSON::XS;
use File::Basename 'basename';
use feature 'state';


sub strhex($) {
    my ($str) = @_;
  
$res[ $fno ];
                }
            } elsif ('JSON' eq uc $ftype) {

                # TODO: decode str
                $res[ $fno ] = JSON::XS->new->decode($res[ $fno ] );

            } elsi
 string $_->[2];
                }
            } elsif ('JSON' eq uc $type) {

                # TODO: decode str
                $_->[2] = JSON::XS->new->decode($_->[2] );

            } else {
     
JRPC ( O/OH/OHOLLMEN/JRPC-0.61.tar.gz, OHOLLMEN, 2014; MetaCPAN )
JRPC/JRPC/Client.pm ( view source; MetaCPAN )
 Send Requests to a JSON-RPC Service.
# We completely ride on the wonderful LWP Module.
{
package JRPC::Client;
#
use LWP;
use LWP::UserAgent;
use base ('LWP::UserAgent');
use JSON::XS;
use Data::Dump
er;

#our $mime;
#BEGIN {
# De-facto JSON-RPC Mime type
our $mime = 'application/json';
#};

=head1 NAME

JRPC::Client - JSON-RPC 2.0 Client

=head1 SYNOPSIS

   use JRPC::Client;

   my $client = JRP
so'}\n");

=head1 DESCRIPTION

JRPC::Client is a Perl LWP based JSON-RPC 2.0 Client hoping to minimize tedious boilerplate code for JSON-RPC
interaction, yet enabling advanced use cases by the power o
JRPC ( O/OH/OHOLLMEN/JRPC-0.61.tar.gz, OHOLLMEN, 2014; MetaCPAN )
JRPC/JRPC/Apache2.pm ( view source; MetaCPAN )
);
# qw(OK)
use Apache2::Const -compile => qw(:common); # 'OK', 'DECLINED'
use APR::Table ();
use JSON::XS;
use JRPC; # Import ... ?
*jdie = JRPC::createfault;
#use Storable (); # Would import store -
ache2::RequestUtil;

=head1 NAME

JRPC::Apache2 - JSON-RPC Services in Apache2 / mod_perl runtime

=head1 DESCRIPTION

This package is a mod_perl JSON-RPC handler / dispatcher. It only contains the co
SetHandler modperl
     PerlResponseHandler JRPC::Apache2
   </Location>

=cut
# Parse and handle JSON-RPC Request.
# reads POST body by $r->read($buffer, $len).
# if/else dispatching (of 3 meth) give
WebService-Desk ( L/LE/LEV/WebService-Desk-0.6.tar.gz, LEV, 2014; MetaCPAN )
WebService-Desk/lib/WebService/Desk.pm ( view source; MetaCPAN )
>user_agent(__PACKAGE__ . ' ' . $WebService::Desk::VERSION);
    $self->content_type('application/json');
    $self->base_url('https://' . $self->user . '.desk.com/api/v2');
    $self->auth_type('oaut
App-CPANTS-Lint ( I/IS/ISHIGAKI/App-CPANTS-Lint-0.05.tar.gz, ISHIGAKI, 2014; MetaCPAN )
App-CPANTS-Lint/lib/App/CPANTS/Lint.pm ( view source; MetaCPAN )
 $opts{no_capture} = 1 if !defined $opts{no_capture};
    $opts{dump} = 1 if $opts{yaml} || $opts{json};
    if ($opts{metrics_path}) {
        Module::CPANTS::Analyse->import(@{$opts{metrics_path}});
  return CPAN::Meta::YAML::Dump($thingy);
    } elsif ($self->{opts}{json} && eval { require JSON::PP }) {
        my $coder = JSON::PP->new->utf8;
        $coder->pretty if $pretty;
        return $c
st});
    }
    my $extension =
        $self->{opts}{yaml} ? '.yml' :
        $self->{opts}{json} ? '.json' :
        $self->{opts}{dump} ? '.dmp' :
        '.txt';

    require File::Spec;
    File:
JRPC ( O/OH/OHOLLMEN/JRPC-0.61.tar.gz, OHOLLMEN, 2014; MetaCPAN )
JRPC/bin/jrpc_client.pl ( view source; MetaCPAN )
erl
use Data::Dumper;
use JRPC::Client;
use JSON::XS;
use Getopt::Long;

#use threads;
use strict;
use warnings;

=head1 NAME

jrpc_client.pl - Generic JSON-RPC Client for JRPC toolkit

=head1 SYNOPSI
m * url - Service URL to send JSON-RPC request to

=item * method - JSON-RPC Method  (e.g 'Pkg.meth' or just 'meth')

=item * parafile - JSON file with parameters for JSON-RPC "params" section

=back
tions (\%para, @pspec);
if (!$para{'url'}) {die("Need URL");}
#if (!$para{'parafile'}) {die("Need JSON-RPC Parameter file ('parafile')");}
if (!$para{'method'}) {die("Need 'method' (In valid format 'm
JRPC ( O/OH/OHOLLMEN/JRPC-0.61.tar.gz, OHOLLMEN, 2014; MetaCPAN )
JRPC/JRPC/CGI.pm ( view source; MetaCPAN )
talsToBrowser warningsToBrowser/;
use JSON::XS;
use JRPC;
use strict;
use warnings;
use Scalar::Util ('reftype'); # Check base types

=head1 NAME

JRPC::CGI - JSON-RPC 2.0 Processing for CGI and HTTP:
:Server::Simple::CGI

=head1 DESCRIPTION

This package provides JSON-RPC 2.0 services processor for 2 runtimes based on:

=over 4

=item * CGI (CGI.pm) Plain old CGI scripting (or mod_perl ModPerl::Re
 Keep this anywhere that may use CGI request object
sub CGI::uri {return $_[0]->script_name();}
# JSON RPC Response ID for malformed requests.
our $naid = 666666666;

=head2 JRPC::CGI::handle_cgi($cgi
JRPC ( O/OH/OHOLLMEN/JRPC-0.61.tar.gz, OHOLLMEN, 2014; MetaCPAN )
JRPC/JRPC/Nginx.pm ( view source; MetaCPAN )
package JRPC::Nginx;
use JRPC;
use JSON::XS;
# require - to avoid symbol resolution problems ?
require nginx; # nginx / Nginx ?
use strict;
use warnings;

our $VERSION = "0.9";

# See Perldoc at the e
.
#This encapsulates the 
#=cut
sub handle_2nd_stage {
   my ($r) = @_;
   my $jr = {'id' => $$, 'jsonrpc' => '2.0', };
   my $buffer = $r->request_body();
   
   eval {
   # Parse Request
   my $j = 
now) that do not serialize
   # well. Be ready to encounter exceptions here.
   my $out = JSON::XS::encode_json($jr); # Serialize as a separate step to know length
   
   ################# Nginx Outpu
App-CPANTS-Lint ( I/IS/ISHIGAKI/App-CPANTS-Lint-0.05.tar.gz, ISHIGAKI, 2014; MetaCPAN )
App-CPANTS-Lint/bin/cpants_lint.pl ( view source; MetaCPAN )
qw/:config gnu_compat/;
use Pod::Usage;

GetOptions(\my %opts, qw(
  help|? man verbose dump yaml json colour|color save|to_file dir=s metrics_path=s@
));

pod2usage(1) if $opts{help};
pod2usage(-exit
sult using Data::Dumper
        --yaml              dump result as YAML
        --json              dump result as JSON

        --save              write report (or dump) to a file
        --dir     
tead of displaying a report text).

=head2 --yaml

Dump the result as YAML.

=head2 --json

Dump the result as JSON.

=head3 --save

Output the result into a file instead of STDOUT.

The name of the f
Mojo-Autobox ( J/JB/JBERGER/Mojo-Autobox-0.03.tar.gz, JBERGER, 2014; MetaCPAN )
Mojo-Autobox/lib/Mojo/Autobox.pm ( view source; MetaCPAN )
strict;
 use Mojo::Autobox;

 # "site.com\n"
 '{"html": "<a href=\"http://site.com\"></a>"}'
   ->json('/html')
   ->dom->at('a')->{href}
   ->url->host
   ->byte_stream->say;

=head1 DESCRIPTION

Usi
Acme-Rando ( C/CR/CREIN/Acme-Rando-0.1.tar.gz, CREIN, 2014; MetaCPAN )
Acme-Rando/lib/Acme/Rando.pm ( view source; MetaCPAN )
ackage Acme::Rando;
$Acme::Rando::VERSION = '0.1';
use strict;
use warnings;

use HTTP::Tiny;
use JSON;

use parent 'Exporter';
our @EXPORT = qw(rando);


  
=head1 NAME

Acme::Rando - Get a Random St
andom?source=starwars&format=json');
	
	unless ($res->{success}) {
		return "These aren't the droids you're looking for: $res->{reason}"
	}
	
	my $dat  = JSON::decode_json($res->{content});
	
	return 
WebService-Mandrill ( L/LE/LEV/WebService-Mandrill-0.8.tar.gz, LEV, 2014; MetaCPAN )
WebService-Mandrill/lib/WebService/Mandrill.pm ( view source; MetaCPAN )
);
    $self->strict_ssl(1);
    $self->content_type('application/json');
    $self->default_method('POST');
    $self->extension('json');
    $self->base_url('https://mandrillapp.com/api/1.0');
    $
tntcompat ( U/UN/UNERA/tntcompat-0.4.tar.gz, UNERA, 2014; MetaCPAN )
tntcompat/lib/TntCompat/Config.pm ( view source; MetaCPAN )
 "Wrong space[$_].field[$fno] type: $type\n"
                    unless $type =~ /^(NUM|NUM64|STR|JSON|MONEY)$/
            }
        } else {
            die "Wrong space[$_].fields\n";
        }


 

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