Group
Extension

Matches 35359

Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Process.pm ( view source; MetaCPAN )
********************************
no Moose;

1;

__END__

=head1 NAME

Zenoss::Router::Process - A JSON/ExtDirect interface to operations on processes

=head1 SYNOPSIS

    use Zenoss;
    my $api = Ze
 defaults and return content.

The documentation for this module was mostly taken from the Zenoss JSON API docs.  Keep in mind
that their (Zenoss Monitoring System) programming is based around python,
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/ZenPack.pm ( view source; MetaCPAN )
********************************
no Moose;

1;

__END__

=head1 NAME

Zenoss::Router::ZenPack - A JSON/ExtDirect interface to operations on ZenPacks

=head1 SYNOPSIS

    use Zenoss;
    my $api = Zen
 defaults and return content.

The documentation for this module was mostly taken from the Zenoss JSON API docs.  Keep in mind
that their (Zenoss Monitoring System) programming is based around python,
Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/foo.pl ( view source; MetaCPAN )
use strict;
use warnings;
use JSON;
use Text::TNetstrings qw(:all);
use Benchmark qw(cmpthese);
my $structure = {
	'resources' => {
		'license' => [
			'http://opensource.org/licenses/mit-license.php'
y $tn = encode_tnetstrings($structure);
my $json = encode_json($structure);
print "TNetstrings (" . length($tn) . ")
$tn

JSON (" . length($json) . ")
$json
";

cmpthese(-10, {
	'TNetstrings' => sub{d
ecode_tnetstrings(encode_tnetstrings($structure))},
	'JSON' => sub{decode_json(encode_json($structure))},
});

Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Tree.pm ( view source; MetaCPAN )
 defaults and return content.

The documentation for this module was mostly taken from the Zenoss JSON API docs.  Keep in mind
that their (Zenoss Monitoring System) programming is based around python,
Test-Legal ( I/IO/IOANNIS/Test-Legal-0.10.tar.gz, IOANNIS, 2011; MetaCPAN )
Test-Legal/lib/Test/Legal.pm ( view source; MetaCPAN )
) copyright notices in .pl and .pm distribution files; (b) for author entry 
 in META.yml or META.json, which ever peresent; and (c) for existence of LICENSE file, with the
 correct license text autog
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Examples.pod ( view source; MetaCPAN )

=pod

=head1 NAME

Examples covering the Zenoss JSON API

=head1 OVERVIEW

This page serves as collection of some quick examples designed to get one started.  I will
try to add more occasionally.

=h
eviceName  => 'newdevice',
            deviceClass => '/Server/Linux',
            model       => JSON::true,
        }
    );
    
    # Print the JobID that this device will be processed under
    m
Decl ( M/MI/MICHAEL/Decl-0.11.tar.gz, MICHAEL, 2011; MetaCPAN )
Decl/lib/Decl/Template.pm ( view source; MetaCPAN )
e of templates
is to express data in display text.

Decl templates are based pretty closely on JSON::Templates (a system used in Python and Javascript that I rather like).

This class, instead of
         $value = scalar @$value;
      }
      # If the value is a hashref, run it through our JSONifier for output as a debugging value.
      # If it's an object, do .... hell, I dunno.  If it c
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Response.pm ( view source; MetaCPAN )
package Zenoss::Response;
use strict;
use JSON qw{};

use Moose;
with 'Zenoss::Error';

#**************************************************************************
# Public Attributes
#***************
,
    is          => 'ro',
    handles     => {
        # Proxy methods to HTTP::Response
        json                    => 'decoded_content',
        raw_response            => 'as_string',
        
time            => 'current_age',
    },
    required    => 1,
);

# Perl reference format of the JSON return data
has decoded => (
    is          => 'ro',
    isa         => 'Ref',
    builder     =
Redis-Dump ( T/TB/TBR/Redis-Dump-0.016.tar.gz, TBR, 2011; MetaCPAN )
Redis-Dump/lib/Redis/Dump.pm ( view source; MetaCPAN )
t Dumper( \$dump->run );

=head1 DESCRIPTION

It's a simple way to dump data from redis-server in JSON format or any format
you want.

=head1 COMMAND LINE API

This class uses L<MooseX::Getopt> to pro
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router.pm ( view source; MetaCPAN )
package Zenoss::Router;
use strict;
use File::Find;
use File::Basename;
use JSON qw{};
use LWP::UserAgent;
use HTTP::Request::Common qw{POST};

use Moose;
use Moose::Util qw {apply_all_roles};
use Zen
***************************************************************
our $JSON_CONTENT_TYPE;     *JSON_CONTENT_TYPE = \q{application/json; charset=utf-8};

#************************************************
ease the transaction counter
    $self->_increase_transaction_count;

    # Build JSON request in HASHREF
    my $JSON_DATA = {
        action  => $args->{'action'},
        method  => $args->{'method
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Report.pm ( view source; MetaCPAN )
*********************************
no Moose;

1;

__END__

=head1 NAME

Zenoss::Router::Report - A JSON/ExtDirect interface to operations on reports

=head1 SYNOPSIS

    use Zenoss;
    my $api = Zeno
 defaults and return content.

The documentation for this module was mostly taken from the Zenoss JSON API docs.  Keep in mind
that their (Zenoss Monitoring System) programming is based around python,
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Network.pm ( view source; MetaCPAN )
********************************
no Moose;

1;

__END__

=head1 NAME

Zenoss::Router::Network - A JSON/ExtDirect interface to operations on networks

=head1 SYNOPSIS

    use Zenoss;
    my $api = Zen
 defaults and return content.

The documentation for this module was mostly taken from the Zenoss JSON API docs.  Keep in mind
that their (Zenoss Monitoring System) programming is based around python,
Text-TNetstrings ( S/SE/SEBNOW/Text-TNetstrings-v1.2.0.tar.gz, SEBNOW, 2011; MetaCPAN )
Text-TNetstrings/benchmark/decode.pl ( view source; MetaCPAN )
equire JSON::PP;
	my $encoded = JSON::PP::encode_json($structure);
	$benchmarks{'JSON::PP'} = sub{JSON::PP::decode_json($encoded)};
} or warn "Unable to require JSON::PP";

eval {
	require JSON::XS;
	
my $encoded = JSON::XS::encode_json($structure);
	$benchmarks{'JSON::XS'} = sub{JSON::XS::decode_json($encoded)};
} or warn "Unable to require JSON::XS";

eval {
	require Convert::Bencode;
	my $encode
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss/Router/Search.pm ( view source; MetaCPAN )
*********************************
no Moose;

1;

__END__

=head1 NAME

Zenoss::Router::Search - A JSON/ExtDirect interface to operations on searches

=head1 SYNOPSIS

    use Zenoss;
    my $api = Zen
f this module is considered experimental!  Zenoss
hasn't documented these calls in the Public API JSON Docs, thus I've pieced together what I could
from reading their code.  Also, it would appear that
 defaults and return content.

The documentation for this module was mostly taken from the Zenoss JSON API docs.  Keep in mind
that their (Zenoss Monitoring System) programming is based around python,
Zenoss ( P/PA/PATBAKER/Zenoss-1.11.tar.gz, PATBAKER, 2011; MetaCPAN )
Zenoss/lib/Zenoss.pm ( view source; MetaCPAN )
>meta->make_immutable;
no Moose;

1;

__END__

=head1 NAME

Zenoss - Perl interface to the Zenoss JSON API

=head1 SYNOPSIS

    use Zenoss;
    use Data::Dumper;

    # Create a Zenoss object
    my 
ponse is now an instance of Zenoss::Response
    # now we can do things like
    print $response->json();
    print $response->http_code();

    # get the response in a perl reference
    my $ref = $r
 severity of 0,1,2,3,4 or 5
    my $events = $api->events_query(
        {
            history => JSON::true,
            params  => {
                severity => [0,1,2,3,4,5],
            }
        
Dist-Zilla-Plugin-Meta-Dynamic-Config ( B/BI/BINGOS/Dist-Zilla-Plugin-Meta-Dynamic-Config-0.04.tar.gz, BINGOS, 2011; MetaCPAN )
Dist-Zilla-Plugin-Meta-Dynamic-Config/lib/Dist/Zilla/Plugin/Meta/Dynamic/Config.pm ( view source; MetaCPAN )
::Meta::Dynamic::Config is a L<Dist::Zilla> plugin that allows an author to
specify in the C<META.json> and/or C<META.yml> files produced by L<Dist::Zilla> that their
distribution performs some dynami
Google-Plus ( Z/ZA/ZAKAME/Google-Plus-0.004.tar.gz, ZAKAME, 2011; MetaCPAN )
Google-Plus/lib/Google/Plus.pm ( view source; MetaCPAN )
vity   => '/activities/ID'
);

# transform our api dispatch above into an HTTPS request
# returns JSON decoded result or throws exception otherwise
sub _request {
  my ($self, $api, $id, $args) = @_;
uccess and return $tx->res->json;

  # we never get here, unless something went wrong
  my $message = $tx->error;
  $tx->res->json and do {
    my $json_err = $tx->res->json->{error}->{message};
    $
message = join ' ', $message => $json_err;
  };
  die "Error: $message";
}

sub new {
  my $self = bless {}, shift;

  croak "API key required" unless $_[0] and $_[0] eq 'key';

  $self->key($_[1]);
 
App-podweaver ( S/SG/SGRAHAM/App-podweaver-1.00.tar.gz, SGRAHAM, 2011; MetaCPAN )
App-podweaver/lib/App/podweaver.pm ( view source; MetaCPAN )
 '.';    

    $dist_info = {};

    if( -r ( $meta_file = File::Spec->catfile( $dist_root, 'META.json' ) ) or
        -r ( $meta_file = File::Spec->catfile( $dist_root, 'META.yml'  ) ) )
    {
      
ta } = CPAN::Meta->load_file( $meta_file );
    }
    else
    {
        $log->warningf( "No META.json or META.yml file found, " .
            "is '%s' a distribution directory?", $dist_root )
       
uild
  ./Build test
  ./Build install

=end readme

=head1 BOOTSTRAPPING WITH META.json/META.yml

Since the META.json/yml file is often generated with an abstract extracted
from the POD, and L<App::po
WWW-Yahoo-Smushit ( F/FV/FVOX/WWW-Yahoo-Smushit-0.03.tar.gz, FVOX, 2011; MetaCPAN )
WWW-Yahoo-Smushit/lib/WWW/Yahoo/Smushit.pm ( view source; MetaCPAN )
package WWW::Yahoo::Smushit;

use strict;
use warnings;
use Moose;
use LWP::UserAgent;
use JSON;

our $VERSION = '0.03';

has _ua => (
    is       => 'rw',
    lazy     => 1,
    required => 1,
    d
    my $json = JSON->new->allow_nonref;
    my $resp = $json->decode($req->content);
    return 1
      if($self->_create_attrs_from_json($resp));

    return 0;
}

sub _create_attrs_from_json {
    m
y ($self, $json) = @_;

    for (keys %{$json}) {
        $self->meta->add_attribute($_, is => 'rw');
        $self->$_($json->{$_});
    }

    $self->meta->make_immutable;

    return 0
      if not
Net-Ostrich ( G/GP/GPHAT/Net-Ostrich-0.01.tar.gz, GPHAT, 2011; MetaCPAN )
Net-Ostrich/lib/Net/Ostrich.pm ( view source; MetaCPAN )
Net::Ostrich::VERSION = '0.01';
}
use Moose;

# ABSTRACT: Perl interface to Ostrich

use JSON::XS qw(decode_json);
use LWP::UserAgent;

has 'client' => (
    is => 'rw',
    isa => 'LWP::UserAgent',
 
self->port . $self->path . 'gc.json');
    unless($resp->is_success) {
        die("Failed to connect to ostrich: ".$resp->status_line);
    }
    
    return decode_json($resp->decoded_content);
}


lf->port . $self->path . 'ping.json');
    unless($resp->is_success) {
        die("Failed to connect to ostrich: ".$resp->status_line);
    }
    
    return decode_json($resp->decoded_content);
}



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