my $api = shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/domains/%s.json', @args;
$api->base->call("GET", $uri, @_);
}
=pod
=item resolve_path
my $res = $tp->
shift;
my @args;
push @args, shift; # id
my $uri = sprintf '/domains/%s/resolve-path.json', @args;
$api->base->call("POST", $uri, @_);
}
=pod
=back
=cut
### END auto-generated
1
'0.4002';
use Any::Moose;
use Carp qw( croak );
use HTTP::Request::Common;
use HTTP::Status;
use JSON;
use LWP::UserAgent;
use Net::OAuth::Simple;
use WWW::TypePad::Error;
# TODO import flag to prel
my $api = shift;
my( $key ) = @_;
return $api->call_anon( GET => '/api-keys/' . $key . '.json' );
}
sub uri_for {
my $api = shift;
my( $path ) = @_;
$path = '/' . $path unless $p
$method eq 'PUT') and $qs) {
$extra{ContentBody} = JSON::encode_json($qs);
$extra{ContentType} = 'application/json';
}
my $oauth = $api->oauth;
$res =
ted';
}
my $args=lc $r->args;
if( $args ne 'yaml' and eval 'require JSON::XS' ) {
$r->print( JSON::XS::encode_json
( {
TranslationKey=>$cf->{key},
TranslationProvider=>$cf->
key},
TranslationProvider=>$cf->{provider_param},
TranslationEvalCache=>$cache,
} ) );
} else {
die "Please install JSON::XS or YAML";
}
return Apache2::Const::OK;
}
1;
__END__
#!/usr/bin/perl
use strict;
use Data::Dump 'pp';
use Template;
use JSON;
use LWP::Simple;
use FindBin qw($Bin);
use String::CamelCase qw(camelize decamelize);
use lib "$Bin/../lib";
use WWW::TypePad::
ad.com";
my $file = "method-mappings.json";
warn "Downloading $file\n";
LWP::Simple::mirror("http://$host/client-library-helpers/$file", "$Bin/$file");
my $json = do { open my $fh, "<", "$Bin/$file
" or die $!; join '', <$fh> };
my $mappings = decode_json($json);
for my $key (keys %$mappings) {
WWW::TypePad::CodeGen::handle_object($key, $mappings->{$key})
}
use Moose;
our $VERSION = '1.0000'; # VERSION
#use Data::Dump;
use HTTP::Request;
use JSON qw(to_json from_json);
use LWP::UserAgent;
use Parallel::ForkManager;
has email => ( is => 'ro', isa =>
$self->email, $self->password);
$agent->default_header(Accept => 'application/json');
return $agent;
},
handles => [qw(get request)],
);
has base_uri => (
is =
_;
my ($response, $data);
#$response = $self->agent->get($self->base_uri);
#dd from_json $response->content;
#exit;
#$response = $self->agent->get($data->{versions}[0]);
$re
g and receiving JSON arrays encoded as
UTF-8. The server expects JSON arrays to be sent back-to-back, without any
separators, but for testing purposes it is often convenient to end JSON
arrays with AS
protocol.
To support programming languages without incremental JSON parsers,
the server will append an ASCII LF character to each JSON array and
additionally will make sure that its replies will nev
in any ASCII
LF characters, so instead of directly parsing the JSON stream, the client
may also read single lines and then decode the JSON array contained in
each line.
Note 1: This means that one ca
al $ENV{'PERL5LIB'} = undef;
local $ENV{'PERL_YAML_BACKEND'} = undef;
local $ENV{'PERL_JSON_BACKEND'} = undef;
local $ENV{'PATH'} = $self->get_path_string() . q{;} . join q{;}, @keep;
$s
st, 'Compress::unLZMA';
}
push @modules_list, qw{
Win32::UTCFileTime
CPAN::Meta::YAML
JSON::PP
Parse::CPAN::Meta
YAML
Net::FTP
Digest::MD5
Digest::SHA1
Digest::SHA
Mod
h end devices are connected to which switch ports on which
switches and routers. It also offers a JSON-based client API, for which
this module is an implementation.
In addition to Porttracker, the Po
();
use AnyEvent ();
use AnyEvent::Handle ();
use MIME::Base64 ();
use Digest::HMAC_MD6 ();
use JSON ();
our $VERSION = '1.01';
sub call {
my ($self, $type, @args) = @_;
$self->{$type}
=> sub {
while ($_[0]{rbuf} =~ s/^([^\x0a]*)\x0a//) {
my $msg = JSON::decode_json $1;
my $id = shift @$msg;
if (defined $id) {
anages backimap status
use Moose;
use MooseX::Storage;
with Storage( 'format' => 'JSON' );
# Storage prereq
use JSON::Any();
use version();
use English qw( -no_match_vars );
has timestamp => (
as storage => (
is => 'ro',
isa => 'App::backimap::Storage',
);
my $FILENAME = 'backimap.json';
# Extra status initialization is not documented in POD.
sub BUILD {
my $self = shift;
->storage;
if ( $self->storage->init ) {
$self->save();
}
else {
my $json = $self->storage->get($FILENAME);
# Do not check package if version is alpha (CPAN: #683
:Primitive::Path;
use Moose;
use MooseX::Storage;
with 'MooseX::Clone';
with Storage (format => 'JSON', io => 'File');
use Geometry::Primitive::Arc;
use Geometry::Primitive::Bezier;
use Geometry::Pr
;
use Moose;
use MooseX::Storage;
use overload ('""' => 'to_string');
with Storage('format' => 'JSON', 'io' => 'File');
use Forest::Tree;
use Graphics::Primitive::Border;
use Graphics::Primitive::I
orage;
extends 'Graphics::Primitive::Component';
with 'MooseX::Clone';
with Storage (format => 'JSON', io => 'File');
use Graphics::Primitive::Path;
has path => (
isa => 'Graphics::Primitive::
rimitive::Border;
use Moose;
use MooseX::Storage;
with 'MooseX::Clone';
with Storage (format => 'JSON', io => 'File');
use Graphics::Color;
use Graphics::Primitive::Brush;
has 'bottom' => (
is
package Graphics::Primitive::Container;
use Moose;
use MooseX::Storage;
with Storage (format => 'JSON', io => 'File');
use Graphics::Primitive::ComponentList;
use Forest::Tree;
extends 'Graphics::
age Graphics::Primitive::ComponentList;
use Moose;
use MooseX::Storage;
with Storage (format => 'JSON', io => 'File');
has 'components' => (
traits => ['Array'],
is => 'rw',
isa => 'Arra
oose::Util::TypeConstraints;
use MooseX::Storage;
with 'MooseX::Clone';
with Storage (format => 'JSON', io => 'File');
enum 'LineCap' => qw(butt round square);
enum 'LineJoin' => qw(miter round beve
seX::Storage;
with 'Geometry::Primitive::Equal';
with 'MooseX::Clone';
with Storage (format => 'JSON', io => 'File');
use Moose::Util::TypeConstraints;
coerce 'Graphics::Primitive::Insets'
=>
;
use MooseX::Storage;
extends 'Graphics::Primitive::Paint::Gradient';
with Storage (format => 'JSON', io => 'File');
has line => (
isa => 'Geometry::Primitive::Line',
is => 'rw',
);
__PAC
orage;
extends 'Graphics::Primitive::Operation';
with 'MooseX::Clone';
with Storage (format => 'JSON', io => 'File');
use Graphics::Primitive::Brush;
has brush => (
isa => 'Graphics::Primitive