ious policies. It will also update the
list of build prereqs, according to F<META.yml> (or F<META.json>)
shipped with the distribution.
Note that this command will abort if it finds that the spec is
package WWW::KrispyKreme::HotLight;
use Mojo::Base -base;
use Mojo::UserAgent;
use Mojo::JSON ();
our $VERSION = '1.1';
has 'where';
has locations => \&_build_locations;
sub _build_locations {
search => Mojo::JSON::encode_json($search),
};
my $json = $ua->get(
$hotlight_url => $header => form => $form,
)->res->json;
[map $_->{Location}, @$json];
}
1;
__END__
=
s;
use Data::Printer;
use Mojo::Base 'Mojolicious::Controller';
use JSON::XS;
use Number::Format qw/format_bytes/;
my $json = JSON::XS->new->allow_nonref;
# Multipart upload handler
sub store {
use JSON::XS;
use AnyEvent;
use Scalar::Util qw/refaddr/;
use Carp qw/confess/;
use overload '""' => \&to_string;
use Data::UUID;
my $uuid = Data::UUID->new();
my $timeout = 60;
my $json
= JSON::XS->new->allow_nonref;
#my $json = JSON->new();
sub new {
my $class = shift;
confess "called as object method" if ref $class;
my $args = shift || {};
confess "no parent supplie
my $url = "https://" . $self->ip . ":" . $self->port . "/REST/1.0/ping?";
my $nodedata = $json->encode($all_nodes);
$self->{ping_ua} = Mojo::UserAgent->new;
$self->{ping_cv} = AE::cv;
:Cookie;
use HTTP::Cookies;
use HTTP::Request;
use JSON;
use LWP::UserAgent;
use URI;
use URI::Encode;
# For better performance, also install:
# JSON::XS
# DEBUG
# use Data::Dumper;
#
# 0 = None, 5
ed $total total items.\n";
=head1 EXPORT
Currently nothing.
=cut
my $json = JSON->new->allow_nonref;
$json->pretty(1);
$json->canonical(1);
#
# TODO: add getter/setter?
#
my $page_size_default
et'} = undef;
}
my $data = $json->encode($payload_out);
my $h = HTTP::Headers->new;
$h->header(
'content-type' => 'application/json;charset=UTF-8',
'x-csrf-token'
['YAML', 'text/yaml', {circular=>0}],
json => ['CompactJSON', 'application/json', {circular=>0}],
'json-pretty' => ['JSON', 'application/json', {circular=>0}],
text => [$
have one type of cleansing, oriented towards JSON
if (!$cleanser) {
require Data::Clean::JSON;
$cleanser = Data::Clean::JSON->get_cleanser;
}
$res = $cl
tter->($format, $res);
} else {
my %o;
$o{color} = 0 if !$deco && $format =~ /json|yaml|perl/;
my $data = $is_naked ? $res->[2] : $res;
return Data::Format::Pretty:
package Mojolicious::Command::donuts;
use Mojo::Base 'Mojolicious::Command';
use Mojo::JSON qw(encode_json);
use Mojo::Util qw(dumper);
use Getopt::Long qw(GetOptionsFromArray);
use WWW::KrispyKreme:
";
$state->{cfg}->{db} ||= "table";
$state->{cfg}->{out} ||= "json";
$state->{cfg}->{jsonout} = sprintf("%s/%s/",
$state->{c
ogger::Stdout;
use strict;
use warnings;
use base 'Flower::Chronos::Logger::Base';
#use Data::Printer;
#use JSON ();
sub log {
my $self = shift;
my ($info) = @_;
return $info;
}
1;
>{$con}->{files} =
[split("\n",`ls -R /home/santex/repos/KnowledgeInterDisciplinary/data/json | egrep -i "($con)";`)];
}
return $x;
}
sub import {
my $class = shift;
my @structu
ACKAGE__->drop($StructureName);
exit 0;
}
if($new==1){
use Term::ReadKey;
use JSON;
my $data = decode_json(lc`micro-sense $StructureName words`);
my $char;
my $line;
my $senses=@{$data-
package WebService::SetlistFM;
use JSON::XS;
use Cache::LRU;
use Net::DNS::Lite;
use Furl;
use URI;
use URI::QueryParam;
use Carp;
use Moo;
use namespace::clean;
our $VERSION = "0.04";
$Net::DNS::Li
ift;
return $self->request("artist/$mbid.json");
}
sub city {
my $self = shift;
my $geoid = shift;
return $self->request("city/$geoid.json");
}
sub search_artists {
my $self =
elf->request("search/artists.json", $query_param);
}
sub search_cities {
my $self = shift;
my $query_param = shift;
return $self->request("search/cities.json", $query_param);
}
sub sea
n 0.02
=cut
our $VERSION = '0.02';
use Carp qw(cluck);
use Data::Dumper;
use REST::Client;
use JSON::XS;
use URI;
use Scalar::Util qw(blessed reftype);
use Readonly;
use Exporter 'import';
use Mou
de_json( $response->responseContent() ) };
if ($@) {
cluck( "Cannot parse response content "
. $response->responseContent()
. ", error msg: $@. Is this JSON?"
s = {
'Content-Type' => 'application/json',
Authorization => $key
};
my $response =
eval { $self->ua->POST( $url, encode_json($data), $headers ); };
cluck($@) if $@;
# Lines to add to RT_SiteConfig.pm
Plugin('RTx::FillTicketData');
Set($FillTicketDataSettingsFile => '/home/rt/rt4/etc/fill_ticket_data_settings.json');
3004';
use Carp;
use LWP::UserAgent;
use LWP::MediaTypes;
use HTTP::Request;
use URI::Query;
use JSON;
use Search::Tools;
use Dezi::Response;
=head1 NAME
Dezi::Client - interact with a Dezi server
( !$resp->is_success ) {
croak $resp->status_line;
}
my $paths = from_json( $resp->decoded_content );
if ( !$resp->is_success
or !$paths
o
->{search_uri};
my $query = URI::Query->new(%args);
$query->replace( t => 'JSON' ); # force json response
$query->strip('format'); # old-style name
if ( $self->{serve
ey => 'Gmjtd|lu6t2luan5%2C72%3Do5-larsq',
maxMatches => 50,
origin => 91506,
radius => 30,
units => 'm',
);
say $ua->get($url)->res->json('/searchResults')->;
meResource->find(param('id'));
http_choose_media_type (
'application/json' => sub { to_json $data },
'application/xml ' => sub { to_xml $data },
{ default
d2 http_choose_charset
This keyword should only be used with non-binary media-types, like XML or JSON.
It is used to select in what 'encoding' the representation should be delivered.
NOTE: not sure
ent qw(Plack::Middleware);
use Plack::Response;
use Try::Tiny;
use LWP::UserAgent;
use JSON::XS qw(encode_json);
sub call {
my $self = shift;
my $env = shift;
my $error;
my $res =
$payload->{$key} = $value;
}
$ua->post($self->webhook_url, {
payload => encode_json($payload),
});
}
sub error_message {
my ($self, $env, $error) = @_;
my $user = $ENV
strict;
use warnings;
use LWP;
use LWP::Simple;
use HTTP::Request;
use HTTP::Request::Common;
use JSON;
use Digest::HMAC_SHA1 qw(hmac_sha1_hex);
=head1 NAME
WWW::Freebox - Access to FreeboxOS API
=
oxOS API
my $content = [download_dir => 'path', download_file => ['file.torrent']];
my $jsonResponse = $fbx->request("downloads/add", 1, $content);
}
You can find more informations
=cut
sub new {
my $class = shift;
my $self = {
freebox => shift
};
my $content = decode_json(get("http://".$self->{freebox}."/api_version") or die("Can't access to http://".$self->{freebox}.
package Flower::Chronos::Report;
use strict;
use warnings;
use Time::Piece;
use JSON ();
use Digest::MD5 ();
use Flower::Chronos::Utils qw(parse_time);
use Encode;
sub new {
my $class =
ne = <$fh>)) {
chomp $line;
next unless $line;
my $record = eval { JSON::decode_json($line) };
next unless $record;
my $start = $record->{_start};
my
se 'Mojolicious::Controller';
use JSON::XS;
use Number::Format qw/format_bytes/;
use Data::FreqConvert;
my $json = JSON::XS->new->allow_nonref;
#my $json = JSON::XS->new->allow_nonref();
# resp
a ping
sub ping {
my $self = shift;
my $config = $self->config;
my $nodes = $self->req->json;
# Add all the nodes that have been advertised to us by the pinger.
foreach (@$nodes) {
UID
$config->{nodes}->add_if_necessary($_)
if ( $_->{uuid} );
}
$self->render(
json => { result => 'ok', 'uuid' => $config->{nodes}->self->uuid } );
}
# list my files
sub files {