{ meta_noindex => 1 }
],
qw(
MinimumPerl
MetaConfig
MetaYAML
MetaJSON
),
# Make sure we use a sane version of Test::More, always
[ Prereqs => 'TestMoreW
[MetaYAML] ; include META.yml (v1.4) (dzil core [@Basic])
[MetaJSON] ; include META.json (v2) (more info than META.yml)
[Prereqs / TestRequires]
Test::More = 0.96
;
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
ader('Content-Type');
if ($content_type && $content_type =~ m|.+/json|) {
eval {
$self->{parsed_response} = JSON::XS::decode_json($self->response->decoded_content() );
$self->{response_parsea
an error. e.g. if content is empty or is just a string
$self->debug(sprintf("failed to parse json response: %s\n%s\n",
$self->{response_body},
$@,
));
$self->{response_parseable} =
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
Perl itself.
package Authen::SASL::Perl::OAUTHBEARER 2.1900;
use strict;
use vars qw(@ISA);
use JSON::PP;
@ISA = qw(Authen::SASL::Perl);
my %secflags = (
noanonymous => 1,
);
sub _order {
n $auth_string;
}
sub client_step {
my ($self, $challenge) = @_;
my $json = JSON::PP->new;
my $payload = $json->decode( $challenge );
$self->set_error( $payload );
# Send dummy re
equest failed';
my $res_params = Net::OAuth2::Profile::WebServer::_parse_json($res->content)
or die 'parse_json for refresh_token response failed';
$self->access_token($res_params);
}
res->as_string;
my $res_params = Net::OAuth2::Profile::WebServer::_parse_json($res->content)
or die 'parse_json for userinfo response failed';
return $res_params;
}
sub sign_request
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
bin/perl -c
package App::soapcli;
=head1 NAME
App::soapcli - SOAP client for CLI with YAML and JSON input
=head1 SYNOPSIS
my $app = App::soapcli->new(argv => [qw( calculator.yml calculator.url
::Tiny ();
use YAML::Syck ();
use YAML::XS ();
use JSON::PP ();
=head1 ATTRIBUTES
=over
=item argv : ArrayRef
Arguments list with o
self->{extra_argv}->[2];
my $request = do {
if ($arg_request =~ /^{/) {
JSON::PP->new->utf8->relaxed->allow_barekey->decode($arg_request);
}
elsif ($arg_reque
= '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;
use Net::Amazon::SignatureVersion4;
$response=$self->_submit_request($hr);
if ($response->is_success) {
my $vault_list = decode_json($response->decoded_content());
foreach my $vault(@{$vault_list->{'VaultList'}}){
push @rv,
$response=$self->_submit_request($hr);
if ($response->is_success) {
my $vault_list = decode_json($response->decoded_content());
foreach my $vault(@{$vault_list->{'VaultList'}}){
push @rv,
::Sentry::Client;
use strict;
use warnings;
use HTTP::Request::Common;
use LWP::UserAgent;
use JSON ();
use Data::UUID::MT ();
use MIME::Base64 'encode_base64';
use Compress::Zlib;
use Time::HiRes
( $uri, %header, Content => $message );
return $request;
}
# From outside message, we make a json message for server.
sub _getMessage {
my ( $self, $params ) = @_;
my $data = {
arams->{traceback}||undef,
};
my $json = JSON->new->utf8(1)->pretty(1)->allow_nonref(1)->encode( $data );
return encode_base64(compress( $json ));
}
# Make signature which is require
>,
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
;
my $client = Net::HTTP::Spore->new_from_string($self->spec );
$client->enable( 'Format::JSON' );
$client;
}
sub _build_spec
{
my $factual_spec =
'{
"base_url" : "http://a
"subject_key"
]
},
"api_format" : [
"json"
],
"documentation" : "This method either suggests corrections for sing
"include_schema"
]
},
"api_format" : [
"json"
],
"documentation" : "The read method enables you to read either a sin
'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
-doit has a built-in API based on JSON-RPC. To call this API set its URL:
Set($IDoitURL, 'http://example.org/i-doit/');
Set($IDoitAPI, $IDoitURL . '?api=jsonrpc');
Set($IDoitUser, 'admi
by setting
C<$l_url> to the URL of i-doit's API, e. g.
C<http://example.org/i-doit/index.php?api=jsonrpc>. In RT's site configuration
C<$IDoitAPI> has to be set to this script, e. g.
C<http://rt.exam
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
s';
use namespace::autoclean;
has 'format' => ( is => 'ro', isa => 'Str', default => 'JSON' );
has 'format_args' => ( is => 'ro', isa => 'HashRef', default => sub { {} } );
has 'engi
# default
engine_args => { password => read_password('Pass: ') },
format => 'JSON', # default
);
my %data = $collector->collect;
...
Data::Collector uses I<Info>s to
ill actually be a module
to push all the changes you want in a database you have.
The default is JSON.
=head2 format_args(HashRef)
Much like I<engine_args>, you can supply any additional arguments
$conf{content_type} = "application/rdf+xml";
} elsif ( $args{format} eq "json" ) {
$template = "json_index.tt";
$conf{content_type} = "text/javascript";
} elsif
$guide->show_metadata(type => "category");
$guide->show_metadata(type => "category", format => "json");
Lists all metadata types, or all metadata values of a given
type. Useful for programatically
if($args{"format"}) {
if($args{"format"} eq "json") {
$content_type = "text/javascript";
my $json = OpenGuides::JSON->new( wiki => $wiki,
(getcwd);
use File::Basename;
use Gearman::Client;
use Rex::TaskList::Base;
use Rex::Logger;
use JSON::XS;
use base qw(Rex::TaskList::Base);
sub new {
my $that = shift;
my $proto = ref($that)
to execute $task_name on $server->to_s");
$taskset->add_task(
$func_name => encode_json($options), {
on_complete => sub {
Rex::Logger::info("Successfully exec
SION = '0.008';
}
use strict;
use warnings;
use Mojo::Base 'Mojolicious::Controller';
use Mojo::JSON;
use Mojo::Util;
use DateTime;
use DBIx::Class::ResultClass::HashRefInflator;
use Lingua::EN::In
>resultset( $self->{resource} )
->create( $self->{_payload} );
return $self->render_json( $result->{_column_data} );
}
sub update{
my $self = shift;
my $result_rs = $self->app->m
::Class::ResultClass::HashRefInflator');
my @result = $result_rs->all();
return $self->render_json( @result );
}
sub list{
my $self = shift;
my $result = $self->app->model
->result
shift;
$str =~ s/$eol/\n/gs;
return $str;
}
=head1 FAQ
=over 4
=item Why not use YAML/JSON/XML?
There are times when you have existing INI files you need to maintain backward
compatibilit