Group
Extension

Matches 35359

Uninets-Check-Modules-MongoDB ( M/MU/MUGENKEN/Uninets-Check-Modules-MongoDB-0.02.tar.gz, MUGENKEN, 2013; MetaCPAN )
Uninets-Check-Modules-MongoDB/lib/Uninets/Check/Modules/MongoDB.pm ( view source; MetaCPAN )
ATAL => 'all';
use Moo;
use Getopt::Long qw(GetOptionsFromArray);
use Try::Tiny;
use MongoDB;
use JSON;

=head1 NAME

Uninets::Check::Modules::MongoDB - Uninets::Check module to check mongodb servers.
	my ($self, $status, $value, $format) = @_;

	return JSON->new->encode(
		{
			message => $value,
			status  => $status,
		}
	) if $format eq 'json';
	# default last in case some non supported format 
 'Default: num'
				},
				formats => {
					'num'  => 'Returns the status code',
					'json' => 'Returns a JSON structure',
				},
			},
		},
	}
}

=head1 AUTHOR

Matthias Krull, C<< <<m.krull at uni
NoSQL-PL2SQL-Simple ( T/TQ/TQISJIM/NoSQL-PL2SQL-Simple-0.24.tar.gz, TQISJIM, 2013; MetaCPAN )
NoSQL-PL2SQL-Simple/lib/NoSQL/PL2SQL/Simple.pm ( view source; MetaCPAN )
 types are getting more and more 
common as CSV data representation starts to give way to XML and JSON.
RDB's can handle complex data by using I<relational tables>.  (the I<R> in 
I<RDB>.)  But RDB da
App-BCSSH ( H/HA/HAARG/App-BCSSH-0.002002.tar.gz, HAARG, 2013; MetaCPAN )
App-BCSSH/lib/App/BCSSH/Client.pm ( view source; MetaCPAN )
 App::BCSSH::Message qw(send_message BCSSH_SUCCESS BCSSH_FAILURE BCSSH_COMMAND);
use JSON qw(encode_json decode_json);
use Moo::Role;

has 'agent' => ( is => 'ro', default => sub { $ENV{SSH_AUTH_SOCK}
@_;
    my $key = $self->auth_key || '';
    my $message = join '|', $self->handler, $key, encode_json(\@args);
    my ($rtype, $rmessage) = send_message($self->agent_socket, BCSSH_COMMAND, $message);
 unless (defined $rmessage && length $rmessage) {
        return;
    }
    my $response = decode_json($rmessage);
    return wantarray ? @$response : 1;
}

1;
__END__

=head1 NAME

App::BCSSH::Client
App-envfile ( X/XA/XAICRON/App-envfile-0.07.tar.gz, XAICRON, 2013; MetaCPAN )
App-envfile/lib/App/envfile.pm ( view source; MetaCPAN )
= '0.07';

our $EXTENTIONS_MAP = {
    pl   => 'Perl',
    perl => 'Perl',
    js   => 'JSON',
    json => 'JSON',
    yml  => 'YAML',
    yaml => 'YAML',
};

sub new {
    my $class = shift;
    bles
 C<< Perl >>, C<< JSON >> and C<< YAML >> format.
The file format is determined by the extension type. extensions map are:

  pl   => Perl
  perl => Perl
  js   => JSON
  json => JSON
  yml  => YAML
 
n considers that file is envfile.

Also, if you use C<< YAML >> and C<< JSON >>, L<< Data::Encoder >> and L<< YAML >> or L<< JSON >> module is required.

=head1 AUTHOR

xaicron E<lt>xaicron@cpan.orgE<
WebService-Rackspace-DNS ( L/LE/LEV/WebService-Rackspace-DNS-0.1.tar.gz, LEV, 2013; MetaCPAN )
WebService-Rackspace-DNS/lib/WebService/Rackspace/DNS.pm ( view source; MetaCPAN )
' ' . $WebService::Rackspace::DNS::VERSION);
    $self->content_type('application/json');

    # $self->extension('json');
    $self->auth_type('none');
    $self->mapping({
            user    => 'us
Gentoo-Perl-Distmap ( K/KE/KENTNL/Gentoo-Perl-Distmap-0.2.0.tar.gz, KENTNL, 2013; MetaCPAN )
Gentoo-Perl-Distmap/lib/Gentoo/Perl/Distmap.pm ( view source; MetaCPAN )
:Perl::Distmap::VERSION = '0.2.0';
}

# ABSTRACT: A reader/writer for the C<metadata/perl/distmap.json> file.

use 5.010000;
use Moose;



has map => (
  isa     => 'Gentoo::Perl::Distmap::Map',
  is 
2] }


sub decoder {
  return state $json = do { require JSON; JSON->new->pretty->utf8->canonical; }
}

sub encoder {
  return state $json = do { require JSON; JSON->new->pretty->utf8->canonical; }
}
 for the C<metadata/perl/distmap.json> file.

=head1 VERSION

version 0.2.0

=head1 SYNOPSIS

	my $dm  = Gentoo::Perl::Distmap->load(  file => '../path/to/distmap.json' );
	$dm->save( file => '/tmp/fo
App-BCSSH ( H/HA/HAARG/App-BCSSH-0.002002.tar.gz, HAARG, 2013; MetaCPAN )
App-BCSSH/lib/App/BCSSH/Handler.pm ( view source; MetaCPAN )
package App::BCSSH::Handler;
use Moo::Role;
use JSON qw(encode_json decode_json);
use App::BCSSH::Message;
use MooX::CaptainHook qw(on_application);

my %handlers;
sub handlers {
    return %handlers;
 {
    my ($self, $args, $send, $socket) = @_;
    my $json_send = sub {
        my @response = @_;
        my $rmessage = @response ? encode_json(\@response) : '';
        $send->(BCSSH_SUCCESS, $rme
ssage);
        return $socket;
    };
    my $handler_args = decode_json($args);
    $self->handle($json_send, @$handler_args);
    return;
}

sub handler {
    my $self = shift;
    return sub {
   
Dezi-MultiTenant ( K/KA/KARMAN/Dezi-MultiTenant-0.003.tar.gz, KARMAN, 2013; MetaCPAN )
Dezi-MultiTenant/lib/Dezi/MultiTenant.pm ( view source; MetaCPAN )
Dezi::MultiTenant;
use strict;
use warnings;
use Dezi::Server;
use Dezi::MultiTenant::Config;
use JSON;
use Plack::Builder;
use Plack::Request;
use Plack::App::URLMap;
use Data::Dump qw( dump );
use C
tion/xml',
            'application/json',
            ],
            vary_user_agent => 1;

        # JSONP response based on 'callback' param
        enable "JSONP";

        # / is self-description
       available   => \%avail,
    };
    my $resp = to_json($about);
    return [
        200,
        [   'Content-Type'   => 'application/json',
            'Content-Length' => length $resp,
      
Catalyst-Controller-LeakTracker ( W/WR/WREIS/Catalyst-Controller-LeakTracker-0.08.tar.gz, WREIS, 2013; MetaCPAN )
Catalyst-Controller-LeakTracker/lib/Catalyst/Controller/LeakTracker.pm ( view source; MetaCPAN )
em Filtering, etc

Of objects, requests, etc. Javascript or serverside, it doesn't matter.

=item JSON/YAML/XML feeds

Maybe it's useful for someone.

=back

=head1 MINI-TUTORIAL

=head2 Why use LeakT
Finance-MtGox ( M/MN/MNDRIX/Finance-MtGox-0.50.tar.gz, MNDRIX, 2013; MetaCPAN )
Finance-MtGox/lib/Finance/MtGox.pm ( view source; MetaCPAN )
package Finance::MtGox;

use warnings;
use strict;
use Carp qw( croak );
use JSON::Any;
use WWW::Mechanize;
use URI;
use Time::HiRes qw( gettimeofday );
use Digest::SHA qw( hmac_sha512 );
use MIME::Ba
rgs->{secret}
      or croak "You must provide 'key' and 'secret' credentials.";

    $args->{json} = JSON::Any->new;
    $args->{mech} = WWW::Mechanize->new(stack_depth => 0);

    return bless $args
2 call( $name )

Run the API call named C<$name>.  Returns a Perl data structure
representing the JSON returned from MtGox.

=cut

sub call {
    my ( $self, $name ) = @_;
    croak "You must provide 
Mojolicious-Plugin-WWWSession ( H/HO/HOREA/Mojolicious/Mojolicious-Plugin-WWWSession-0.06.tar.gz, HOREA, 2013; MetaCPAN )
Mojolicious-Plugin-WWWSession/lib/Mojolicious/Plugin/WWWSession.pm ( view source; MetaCPAN )
              'Memcached' => { servers => ['127.0.0.1'] }
               ],
    serialization => 'JSON',
    expires => 3600,
    fields => {
              user => {
                      inflate => s
App-BCSSH ( H/HA/HAARG/App-BCSSH-0.002002.tar.gz, HAARG, 2013; MetaCPAN )
App-BCSSH/lib/App/BCSSH/Command/ssh.pm ( view source; MetaCPAN )
App::BCSSH::Proxy;
use App::BCSSH::Options;
use App::BCSSH::Util qw(find_mods rc_dir);
use JSON qw(decode_json);
use constant DEBUG => $ENV{BCSSH_DEBUG};

with Options(
    permute => 0,
);
with 'App:
 rc_dir . '/config'
        or return {};
    my $raw = do { local $/; <$fh> };
    return decode_json($raw);
}

sub run {
    my $self = shift;
    my $args = $self->args;
    my $host = $self->host;
WebService-Booklog ( Y/YA/YAKEX/WebService-Booklog-v0.0.1.tar.gz, YAKEX, 2013; MetaCPAN )
WebService-Booklog/lib/WebService/Booklog.pm ( view source; MetaCPAN )
ccess to unofficial API of booklog.jp
our $VERSION = 'v0.0.1'; # VERSION

use LWP::UserAgent;
use JSON::Any;

sub new
{
	my ($self) = @_;
	my $class = ref $self || $self;
	return bless {
		_UA => LWP:
_} } keys %$data;
	$param = "?$param" if length $param;
	my $ret = JSON::Any->from_json($self->{_UA}->get('http://api.booklog.jp/json/'.$account.$param)->content);
	$ret->{category} = {} if ref $ret->
rn $ret;
}

sub get_review
{
	my ($self, $book_id) = @_;

	my $ret = JSON::Any->from_json($self->{_UA}->get('http://booklog.jp/json/review/'.$book_id)->content);
	return $ret->{$book_id} if exists $re
Music-ChordBot ( J/JV/JV/Music-ChordBot-0.91.tar.gz, JV, 2013; MetaCPAN )
Music-ChordBot/lib/Music/ChordBot/Opus/Section/Style.pm ( view source; MetaCPAN )

sub preset {
    return $presets{$_[1]} if %presets;

    use JSON ();
    my $json = JSON->new;
    while ( <DATA> ) {
	my $data = $json->decode($_);
	my $preset = __PACKAGE__->new;
	$preset->chorus
Music-ChordBot ( J/JV/JV/Music-ChordBot-0.91.tar.gz, JV, 2013; MetaCPAN )
Music-ChordBot/lib/Music/ChordBot.pm ( view source; MetaCPAN )
 "D Min7 4" );

  # Add section to song.
  $song->add_section($section);

  # Export as json.
  print $song->json, "\n";

=head1 DESCRIPTION

Chordbot is a songwriting tool / electronic backup band fo
ordBot can import and export songs in JSON format. Music::ChordBot
provides a set of modules that can be used to programmatically
build songs and produce the JSON data suitable for import into
ChordBo
Music-ChordBot ( J/JV/JV/Music-ChordBot-0.91.tar.gz, JV, 2013; MetaCPAN )
Music-ChordBot/lib/Music/ChordBot/Opus.pm ( view source; MetaCPAN )
   $song->name("Perl Song");
    $song->tempo(120);
    $song->add_section(...);
    print $song->json, "\n";

=head1 METHODS

=head2 new [ args ]

Creates a new Music::ChordBot::Opus object.

Initial
y || "opus" ] );
}

=head2 json [ pretty ]

Produces a string representing the song, in JSON format, suitable
for import into the ChordBot app.

If argument is true, the JSON is pretty-printed for rea
.

=cut

sub json {
    my ( $self, $pretty ) = @_;
    $self->_wrapup;
    use JSON ();
    my $json = JSON->new;
    $json->canonical(1);
    $json = $json->pretty if $pretty;
    $json->encode($sel
WebService-CloudProvider ( L/LE/LEV/WebService-CloudProvider-0.3.tar.gz, LEV, 2013; MetaCPAN )
WebService-CloudProvider/lib/WebService/CloudProvider.pm ( view source; MetaCPAN )
al_machines');
    $self->auth_type('basic');
    $self->content_type('application/json');
    $self->extension('json');
    $self->wrapper('virtual_machine');
    $self->mapping({
            os     
Music-ChordBot ( J/JV/JV/Music-ChordBot-0.91.tar.gz, JV, 2013; MetaCPAN )
Music-ChordBot/lib/Music/ChordBot/Song.pm ( view source; MetaCPAN )
construct a CordBot song. Upon program termination, the song is
written out to standard output in JSON format, suitable for import into
the ChordBot app.

=cut

our $VERSION = 0.01;

use Music::ChordB
he program.
sub END {
    _export() if $song;
}

sub json { $song->json }

sub _export {
    binmode( STDOUT, ':utf8');
    print STDOUT $song->json, "\n";
}

=head1 QUICK ACCESS CHORDS

For convenien
Net-Groonga-HTTP ( T/TO/TOKUHIROM/Net-Groonga-HTTP-0.03.tar.gz, TOKUHIROM, 2013; MetaCPAN )
Net-Groonga-HTTP/lib/Net/Groonga/HTTP.pm ( view source; MetaCPAN )
Net::Groonga::HTTP;
use 5.008005;
use strict;
use warnings;

our $VERSION = "0.03";

use JSON::XS qw(encode_json);
use Furl;
use URI;
use Net::Groonga::HTTP::Response;

use Mouse;

has end_point => ( 
ll($function, %args);
    };
}

sub load {
    my ($self, %args) = @_;
    $args{values} = encode_json($args{values}) if ref $args{values};
    return $self->call('load', %args);
}

1;
__END__

=encod
,
        values => \@values,
    );

Load the data to database. This method encodes I<values> to JSON automatically, if it's arrayref.

=item $groonga->select(%args)

=item $groonga->status(%args)

=
Plack-App-PgREST ( C/CL/CLKAO/Plack-App-PgREST-0.06.tar.gz, CLKAO, 2013; MetaCPAN )
Plack-App-PgREST/lib/Plack/App/PgREST.pm ( view source; MetaCPAN )
Plack::Component);
use Plack::Util::Accessor qw( dsn dbh);
use Plack::Request;
use JSON::PP qw(encode_json decode_json);
use parent qw(Exporter);

our $VERSION = '0.06';
our @EXPORT = qw(pgrest);

sub
1 ? @_ : dsn => 'dbi:Pg:'.$_[0] )->to_app;
}

# maintain json object field order
use Tie::IxHash;
my $obj_parser_sub = \&JSON::PP::object;
*JSON::PP::object = sub {
	tie my %obj, 'Tie::IxHash';
	$obj_
$n = shift;
    return $n unless $n;
    return decode_json $n

}

method select($param, $args) {
    use Data::Dumper;
    my $req = encode_json({
        collection => $args->{collection},
        l

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