root_location
server_root
html_dir
server_port
no_nginx_manager
);
#use Smart::Comments::JSON '###';
use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);
use POSIX qw(EAGAIN);
use IO::Socket;
#our ($Pr
_drizzle
L<http://github.com/chaoslawful/drizzle-nginx-module>
=item ngx_rds_json
L<http://github.com/agentzh/rds-json-nginx-module>
=item ngx_xss
L<http://github.com/agentzh/xss-nginx-module>
=
ent->agent(__PACKAGE__);
#$UserAgent->default_headers(HTTP::Headers->new);
#use Smart::Comments::JSON '##';
our @EXPORT = qw( plan run_tests run_test
repeat_each config_preamble worker_connectio
sponse::VERSION = '0.003';
}
# ABSTRACT: Asana Response Class
use MooX qw(
+WWW::Asana::Error
+JSON
);
use Class::Load ':all';
with 'WWW::Asana::Role::HasClient';
has request => (
is => 'ro',
@_;
return [] unless $self->has_errors;
my @errors;
if (defined $self->json_decoded_body->{errors}) {
for (@{$self->json_decoded_body->{errors}}) {
push @errors, WWW::Asana::Error->new(
m
f $self->code == 500;
}
has json => (
is => 'ro',
lazy => 1,
builder => 1,
);
sub _build_json {
my $json = JSON->new;
$json->allow_nonref;
return $json;
}
has json_decoded_body => (
is => 'r
e32 qw( RFC );
use MIME::Base64;
use Digest::SHA qw( sha1 hmac_sha256 );
use Crypt::Rijndael;
use JSON;
use LWP::UserAgent;
use Storable;
our $VERSION = '0.04';
our @ISA = qw(Exporter);
our @EXPORT
he server.
my $ret = fetch_json($self, $self->{'base_url'} . 'storage/' . $collection . '?full=1');
# The 'payload' elements of the fetched array contain a JSON object that
# has to be de
ach my $item (@$ret) {
my $json = decrypt_collection($self, decode_json($item->{'payload'}), $collection);
# What we see now, looks like another JSON object, but it contains some
meta ) {
return;
}
my $meta = $self->main_file('META.json');
if ( -e $meta ) {
print "Using META.json\n" if $self->cfg->verbose;
}
else {
$meta = $self->ma
.yml\n" if $self->cfg->verbose;
}
else {
print "WARNING: Neither META.json nor META.yml was found\n";
return;
}
}
$meta = CPAN::Meta->load_file
uire LWP::Simple; 1';
my $json_any = eval 'use JSON::Any; 1';
my $changes_parser = eval 'require CPAN::Changes; 1';
my $can_do_requests = $lwp_useragent && $json_any;
my $can_parse_chang
_author {
my $arg = shift;
my $json = LWP::Simple::get(sprintf $module_search, $arg) or return;
my $response = eval { JSON::Any->from_json($json) } or return;
if($response->{stat
$arg =~ s/::/-/g;
my $json = LWP::Simple::get(sprintf $changelog_search, $arg, $ver_stop) or return;
my $response = eval { JSON::Any->from_json($json) } or return;
my $first_hi
'META.yml',
);
my $json_file = File::Spec->catfile(
$the->{tempdir}, 'META.json',
);
if ( -f $json_file ) {
$meta = eval {
CPAN::Meta->load_file($json_file)
};
} elsif
mporary here because regex matching promotes an IV to a PV,
# and that confuses some things (like JSON.pm)
sub Int {
my $value = $_[0];
defined($value) && !ref($value) && $value =~ /\A-?[0-9]+
RITY = 'cpan:TOBYINK';
$XT::Util::VERSION = '0.001';
@EXPORT = qw/__CONFIG__/;
}
use JSON qw/from_json/;
use base qw/Exporter/;
sub __CONFIG__ (;$)
{
my ($package, $file) = caller(0);
$file
t;
$files{ $name } ||= do
{
(my $config_file = $name) =~ s{\.(PL|pl|pm|pmc|t)$}{};
from_json do {
open my $fh, '<', "$config_file\.config"
or return $files{$name} = +{};
local $
ill strip ".t" from
the end of the file name, add ".config", slurp the contents and parse them
as JSON, returning the result.
If C<< $testfile >> is omitted, then uses the caller's filename.
By movi
use JSON;
my $foo = bless { handle => \*STDIN }, 'SomeObj';
print encode_json abridge_recursive( $foo );
local $DATA::Abridge::HONOR_STRINGIFY = undef;
print encode_json abridg
he bridegroom
This module exists to simplify the process of serializing data to formats, such as
JSON, which do not support the full richness of perl datatypes.
An abridged data structure will featu
ndef'},
=> sub { die "I don't know what $_ is" }
);
}
Or a simple JSON serializer:
sub to_json {
my $x = shift;
match_on_type $x => (
HashRef => sub {
. (
join ", " =>
map { '"' . $_ . '" : ' . to_json( $hash->{$_} ) }
sort keys %$hash
) . ' }';
},
o_json($_) } @$array ) . ' ]';
},
Num => sub {$_},
Str => sub { '"' . $_ . '"' },
Undef => sub {'null'},
=> sub { die "$_ is not acceptable json t
;
use strict;
use warnings;
use Moo;
extends 'WWW::ASN::Downloader';
use WWW::ASN::Standard;
use JSON;
=head1 NAME
WWW::ASN::Document - Represents a collection of standards or learning objectives
return $self->_read_or_download(
$self->manifest_cache_file,
$self->uri_manifest_json,
);
}
=head2 id
This is a globally unique URI for this document.
=cut
has 'id' => (
i
=> 'ro',
required => 0,
);
sub uri_manifest_json { return $_[0]->uri . '_manifest.json'; }
sub uri_details_json { return $_[0]->uri . '_full.json'; }
sub uri_details_xml { return $_[0]->uri . '
>,
L<XML::Saxon::XSLT2>.
L<HTML::HTML5::Parser>,
L<RDF::RDFa::Parser>,
L<HTML::Microformats>.
L<JSON::GRDDL>.
L<http://www.w3.org/TR/grddl/>.
L<http://www.perlrdf.org/>.
This module is derived fr
all of the Moose extensions you use will continue to work.
The other part is that Moose's C<META.json> file will also specify the
conflicts under the C<x_conflicts> key. We are working with the Perl
rig ): $!";
$self->ACTION_distclean;
unlink 'MANIFEST', 'MANIFEST.bak', 'META.yml', 'META.json';
}
sub ACTION_dist {
warn <<EOF;
The 'dist' action is usualy used to create a tar.gz to upl
L<WWW::ASN::Standard> object, it has to fetch two
documents, the "details" xml and the "manifest" json.
Ideally this would get everything from the "details" document. We use both though, since it's
= '0.001';
}
use MooseX::App::Command;
use 5.010;
use POSIX qw(strftime);
use HTTP::Request;
use JSON;
use TryCatch;
use WebService::Amazon::Glacier::GlacierError;
extends qw(WebService::Amazon::Glac
;
use HTTP::Request;
use URI::Encode;
use Digest::SHA qw(sha256_hex);
use POSIX qw(strftime);
use JSON;
use 5.010;
# ABSTRACT: Perl module to access Amazon's Glacier service.
# PODNAME: WebService:
if ( ! $response->is_success) {
use Data::Dumper;
my $error_detail=Data::Dumper->Dump([decode_json $response->decoded_content()]);
$error_detail.="CREQ: \n".$self->get_Net_Amazon_SignatureVersion
o', isa => 'Str', default => 'OpenSSH' );
has 'format' => ( is => 'ro', isa => 'Str', default => 'JSON' );
has 'os' => ( is => 'ro', isa => 'Str', default => 'CentOS' );
has 'output' => (
ne_args
Any additional arguments the engine might want.
=head2 format
Type of serialization (C<JSON> or C<YAML>, for example).
=head2 format_args
Any additional arguments the serializer might wan
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" );