Group
Extension

Matches 35359

Mojolicious-Plugin-ServerStatus ( F/FU/FUKAI/Mojolicious-Plugin-ServerStatus-0.04.tar.gz, FUKAI, 2016; MetaCPAN )
Mojolicious-Plugin-ServerStatus/lib/Mojolicious/Plugin/ServerStatus.pm ( view source; MetaCPAN )
';
use Net::CIDR::Lite;
use Parallel::Scoreboard;
use JSON;
use Fcntl qw(:DEFAULT :flock);
use IO::Handle;

our $VERSION = '0.04';

my $JSON = JSON->new->utf8(0);

has conf => sub { +{} };
has skip_ps
  if ( ($env->{QUERY_STRING} || $req->url->query->to_string ||'') =~ m!\bjson\b!i ) {
                return $self->render(json => $status)
            }
            return  $self->render(text => $bod
 => $env->{USER},
            time => time(),
        };
    }
    $self->{__scoreboard}->update($JSON->encode({
        %{$prev},
        pid => $$,
        ppid => getppid(),
        uptime => $self
WWW-Pocket ( D/DO/DOY/WWW-Pocket-0.03.tar.gz, DOY, 2016; MetaCPAN )
WWW-Pocket/lib/WWW/Pocket/Script.pm ( view source; MetaCPAN )
;
$WWW::Pocket::Script::VERSION = '0.03';
use Moose;

use Getopt::Long 'GetOptionsFromArray';
use JSON::PP;
use List::Util 'sum';
use Path::Class;
use URI;
use Pod::Usage;

use WWW::Pocket;

has consu
    } values %$list;
}

sub _pretty_print {
    my $self = shift;
    my ($data) = @_;

    print JSON::PP->new->utf8->pretty->canonical->encode($data), "\n";
}

sub add {
    my $self = shift;
    my
Net-Statsd-Server ( C/CO/COSIMO/Net-Statsd-Server-0.20.tar.gz, COSIMO, 2016; MetaCPAN )
Net-Statsd-Server/lib/Net/Statsd/Server.pm ( view source; MetaCPAN )
atsd *server*

package Net::Statsd::Server;

# Use statements {{{

use strict;
#se warnings;

use JSON::XS ();
use Socket qw(SOL_SOCKET SO_RCVBUF);
use Time::HiRes ();

use AnyEvent;
use AnyEvent::Han
f->{$_} = $opt->{$_}
    for keys %{ $opt };

  bless $self, $class;
}

# Flatten JSON booleans to avoid calls to JSON::XS::bool
# in the performance-critical code paths
sub _flatten_bools {
  my ($se
   $conf_hash->{$_} = !! $conf_hash->{$_};
  }
  return $conf_hash;
}

sub _json_emitter {
  my ($self) = @_;
  my $js = JSON::XS->new()
    ->utf8(1)
    ->shrink(1)
    ->space_before(0)
    ->space
Catalyst-View-Vega ( T/TS/TSIBLEY/Catalyst-View-Vega-0.02.tar.gz, TSIBLEY, 2016; MetaCPAN )
Catalyst-View-Vega/lib/Catalyst/View/Vega.pm ( view source; MetaCPAN )
use utf8;
use 5.008_005;
our $VERSION = '0.02';

use Moose;
use Types::Standard qw< :types >;
use JSON::MaybeXS;
use Path::Tiny;
use List::Util qw< first >;
use namespace::autoclean;

=encoding utf-8
 In a controller action
    #
    my $vega = $c->view('Vega');
    $vega->specfile('patient-chart.json');
    $vega->bind_data({
        "patient"     => [{
            id   => $patient->id,
         
clone(@args);
}

=head1 ATTRIBUTES

=head2 json

Read-only.  Object with C<encode> and C<decode> methods for reading and writing
JSON.  Defaults to:

    JSON::MaybeXS->new->utf8->convert_blessed->can
Net-Statsd-Server ( C/CO/COSIMO/Net-Statsd-Server-0.20.tar.gz, COSIMO, 2016; MetaCPAN )
Net-Statsd-Server/lib/Net/Statsd/Server/Changes.pod ( view source; MetaCPAN )
e flush code wasn't doing this previously.

  Fixed management commands (:8126) to output correct JSON data
    structures.

  This is the first fully functional statsd server release.

=head2 Net::St
WWW-Pocket ( D/DO/DOY/WWW-Pocket-0.03.tar.gz, DOY, 2016; MetaCPAN )
WWW-Pocket/lib/WWW/Pocket.pm ( view source; MetaCPAN )
Pocket v3 API

use HTTP::Tiny;
use IO::Socket::SSL; # Necessary for https URLs on HTTP::Tiny.
use JSON::PP;
use Carp;



has consumer_key => (
    is       => 'ro',
    isa      => 'Str',
    required
  content => encode_json($params),
            headers => {
                'Content-Type' => 'application/json; charset=UTF-8',
                'X-Accept'     => 'application/json',
            },
  
esponse->{status}): $response->{content}"
        unless $response->{success};

    return decode_json($response->{content});
}

__PACKAGE__->meta->make_immutable;
no Moose;


1;

__END__

=pod

=enco
Net-Statsd-Server ( C/CO/COSIMO/Net-Statsd-Server-0.20.tar.gz, COSIMO, 2016; MetaCPAN )
Net-Statsd-Server/lib/Test/Statsd.pm ( view source; MetaCPAN )
$t = Test::Statsd->new({
        binary => './bin/statsd',
        config => './bin/sample-config.json'
    });

    # Brings up the statsd server in the background
    # with the specified configurat
Net-Statsd-Server ( C/CO/COSIMO/Net-Statsd-Server-0.20.tar.gz, COSIMO, 2016; MetaCPAN )
Net-Statsd-Server/lib/Net/Statsd/Server/Backend/Elasticsearch.pm ( view source; MetaCPAN )
sdIndex . '/_bulk',
    method => 'POST',
    headers => {
      'Content-Type'   => 'application/json',
      'Content-Length' => length($payload),
    }
  };

  my $req = HTTP::Request->new();
  $re
Net-Statsd-Server ( C/CO/COSIMO/Net-Statsd-Server-0.20.tar.gz, COSIMO, 2016; MetaCPAN )
Net-Statsd-Server/lib/Net/Statsd/Server/Backend/Console.pm ( view source; MetaCPAN )
 JSON::XS ();

use base qw(Net::Statsd::Server::Backend);

sub init {
  my ($self) = @_;

=cut
  $self->{statsCache} = {
    counters => {},
    timers => {},
  };
=cut

  $self->{json_emitter} = JSON
 => $metrics->{sets},
    pctThreshold  => $metrics->{pctThreshold},
  };

  print STDERR $self->{json_emitter}->encode($out), "\n";
  return;
}

sub status {
  my ($self) = @_;
  return {
    last_fl
Dist-Zilla-PluginBundle-SHANTANU ( S/SH/SHANTANU/Dist-Zilla-PluginBundle-SHANTANU-0.43.tar.gz, SHANTANU, 2016; MetaCPAN )
Dist-Zilla-PluginBundle-SHANTANU/lib/Badge/Depot/Plugin/Shantanutravis.pm ( view source; MetaCPAN )
se;
use namespace::autoclean;
use Types::Standard qw/Str HashRef/;
use Path::Tiny;
use JSON::MaybeXS 'decode_json';
with 'Badge::Depot';

# ABSTRACT: Shantanu Bhadoria's Travis plugin for Badge::Depot
sion,
        };
    }

    return {} if !path('META.json')->exists;

    my $json = path('META.json')->slurp_utf8;
    my $data = decode_json($json);

    return {} if !exists $data->{'resources'}{'r
Dist-Zilla-PluginBundle-SHANTANU ( S/SH/SHANTANU/Dist-Zilla-PluginBundle-SHANTANU-0.43.tar.gz, SHANTANU, 2016; MetaCPAN )
Dist-Zilla-PluginBundle-SHANTANU/lib/Dist/Zilla/PluginBundle/SHANTANU.pm ( view source; MetaCPAN )
a::Plugin::MetaProvides::Package;
use Dist::Zilla::Plugin::MetaYAML;
use Dist::Zilla::Plugin::MetaJSON;
use Dist::Zilla::Plugin::Git::CommitBuild;

use Dist::Zilla::Plugin::PerlTidy;
use Dist::Zilla::
  ? $_[0]->payload->{exclude_filename}
          : [qw/dist.ini Changes README.pod README.md META.json META.yml/];
    },
);


has stopwords => (
    is      => 'ro',
    isa     => 'ArrayRef',
    la
taYAML'
        ,    # core : Helps avoid kwalitee croaks and supports older systems
        'MetaJSON',    # core
        [
            'ChangelogFromGit::CPAN::Changes' => {
                tag_rege
WWW-AUR ( J/JN/JNBEK/WWW-AUR-0.22.tar.gz, JNBEK, 2016; MetaCPAN )
WWW-AUR/lib/WWW/AUR/RPC.pm ( view source; MetaCPAN )
package WWW::AUR::RPC;

use warnings 'FATAL' => 'all';
use strict;

use JSON qw();
use Carp qw();

use WWW::AUR::URI qw( rpc_uri );
use WWW::AUR qw( _category_name _useragent );

my %_RENAME_FOR = ( '
          'LastModified' => 'mtime',
                   );

#---HELPER FUNCTION---
# Purpose: Map JSON package info keys to their new names...
sub _munge_result
{
    my ($info_ref) = @_;

    my %res
 info AUR RPC: ' . $resp->status_line
        unless $resp->is_success;

    my $json = JSON->new;
    my $data = $json->decode( $resp->content );

    if ( $data->{type} eq "error" ) {
        Carp::
JSV ( Z/ZI/ZIGOROU/JSV-0.08.tar.gz, ZIGOROU, 2016; MetaCPAN )
JSV/lib/Test/JSV/Suite.pm ( view source; MetaCPAN )
Suite;

use strict;
use warnings;

use Carp;
use File::Basename;
use File::Spec;
use FindBin;
use JSON;
use Test::More;

sub run {
    my ($class, %opts) = @_;

    %opts = (
        base_dir  => $opt
n} ? ( $self->{base_dir}, $self->{version} ) : ( $self->{base_dir} ), 
        $self->{suite} . ".json"
    );

    note $test_suite_file;

    unless (-f $test_suite_file) {
        croak sprintf("No
@$self{qw/base_dir version suite/});
    }

    open(my $fh, "<", $test_suite_file) or croak $!;
    my $test_suite = decode_json(do { local $/; <$fh> });
    close $fh;
    return $test_suite;
}

1;
JSV ( Z/ZI/ZIGOROU/JSV-0.08.tar.gz, ZIGOROU, 2016; MetaCPAN )
JSV/lib/JSV/Context.pm ( view source; MetaCPAN )
ow_immediate
        enable_history
        enable_format
        formats
        history
        json
        loose_type
    /],
    ro  => [qw/
        errors
        current_type
        current_ke
        current_schema_pointer
        schema_pointer_history
    /],
);

use Carp qw(croak);
use JSON;
use JSV::Keyword qw(:constants);
use JSV::Util::Type qw(detect_instance_type detect_instance_typ
ance {
    my $self = shift;

    my $instance;
    if ( JSON::is_bool($self->current_instance) ) {
        if ( $self->current_instance == JSON::true ) {
            $instance = "true";
        }
   
JSV ( Z/ZI/ZIGOROU/JSV-0.08.tar.gz, ZIGOROU, 2016; MetaCPAN )
JSV/lib/JSV/Keyword/Draft4/Maximum.pm ( view source; MetaCPAN )
ackage JSV::Keyword::Draft4::Maximum;

use strict;
use warnings;
use parent qw(JSV::Keyword);
use JSON;

use JSV::Keyword qw(:constants);

sub instance_type() { INSTANCE_TYPE_NUMERIC(); }
sub keyword(
value($schema);
    my $exclusive_maximum = $class->keyword_value($schema, "exclusiveMaximum") || JSON::false;

    if ($exclusive_maximum) {
        if ($instance >= $maximum) {
            $context-
JSV ( Z/ZI/ZIGOROU/JSV-0.08.tar.gz, ZIGOROU, 2016; MetaCPAN )
JSV/lib/JSV/Util/Type.pm ( view source; MetaCPAN )
e Scalar::Util qw(blessed looks_like_number);
use JSON;

our @EXPORT_OK = (qw/
    detect_instance_type
    detect_instance_type_loose
    escape_json_pointer
/);

our %REF_TYPE_MAP = (
    HASH  => "
  if (!blessed $instance) {
            return $REF_TYPE_MAP{$ref_type};
        }
        elsif (JSON::is_bool($instance)) {
            return "boolean";
        }
        else {
            croak(s
$/;
            return "number_or_string";
        }
    }
    return $type_strict;
}

sub escape_json_pointer {
    my $property = shift;
    return unless defined $property;

    # according to http
JSV ( Z/ZI/ZIGOROU/JSV-0.08.tar.gz, ZIGOROU, 2016; MetaCPAN )
JSV/lib/JSV/Keyword/Draft4/Enum.pm ( view source; MetaCPAN )
um;

use strict;
use warnings;
use parent qw(JSV::Keyword);

use JSV::Keyword qw(:constants);
use JSON;
use List::MoreUtils qw(firstidx);

sub instance_type() { INSTANCE_TYPE_ANY(); }
sub keyword() { 
>keyword_value($schema);
    my $instance_as_json = $context->json->encode($instance);
    my $matched_idx = firstidx { $instance_as_json eq $context->json->encode($_); } @$enum;

    if ($matched_idx
CPANPLUS-Dist-Mageia ( J/JQ/JQUELIN/CPANPLUS-Dist-Mageia-2.103.tar.gz, JQUELIN, 2016; MetaCPAN )
CPANPLUS-Dist-Mageia/lib/CPANPLUS/Dist/Mageia.pm ( view source; MetaCPAN )
        grep {
            ( /^[A-Z.]+$/ && !/^MANIFEST/ ) ||
            m{^(Change(s|log)|META.(json|yml)|(ex|s)amples?|e[gx]|demos?)$}i
        }
        map { basename $_ }
        grep { m!^[^/]+
JSV ( Z/ZI/ZIGOROU/JSV-0.08.tar.gz, ZIGOROU, 2016; MetaCPAN )
JSV/lib/JSV.pm ( view source; MetaCPAN )

our $VERSION = "0.08";

1;
__END__

=encoding utf-8

=head1 NAME

JSV - A perl implementation of JSON Schema (draft-04) validator

=head1 SYNOPSIS

=head1 DESCRIPTION

See e.g. L<JSV::Validator>

=he
JSV ( Z/ZI/ZIGOROU/JSV-0.08.tar.gz, ZIGOROU, 2016; MetaCPAN )
JSV/lib/JSV/Validator.pm ( view source; MetaCPAN )
ry
        throw_error
        throw_immediate
        formats
    /]
);
use Clone qw(clone);
use JSON;
use JSV::Keyword qw(:constants);
use JSV::Reference;
use JSV::Context;
use Module::Pluggable::Ob

        current_schema_pointer => "",
        schema_pointer_history => [],
        json                   => JSON->new->allow_nonref,
        loose_type             => $opts->{loose_type},
    );

 
alidator;
}

1;

__END__

=encoding utf-8

=head1 NAME

JSV::Validator - A perl implementation of JSON Schema (draft-04) validator

=head1 SYNOPSIS

  use feature qw(say);
  use JSV::Validator;

  JSV

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