2,
Name => "on-failure"
},
LogConfig => {
Config => {},
Type => "json-file"
},
SecurityOpt => undef,
VolumesFrom => undef,
Ulimits => [],
CgroupPar
];
run ( command => $cmd, verbose => 0 );
}
if ( -e 'MYMETA.json' ) {
$struct = $self->meta_from_file( 'MYMETA.json' );
}
elsif ( -e 'MYMETA.yml' ) {
$struct = $self->meta_fro
m_file( 'MYMETA.yml' );
}
else {
die "Couldn\'t find a 'MYMETA.yml or MYMETA.json' file, giving up\n";
}
{
my $cmd = [ $^X, 'Build', 'distclean' ];
run( command => $cmd, verbos
::Docker::Events;
use strict;
use warnings;
use Eixo::Base::Clase qw(Eixo::Rest::Product);
use JSON;
my $DEFAULT_TIMEOUT = 30;
has(
Events=>[]
);
sub initialize {
my ($self, @args) =
= JSON->new->encode($args{filters});
}
$self->api->getEvents(
get_params=>[qw(filters since until)],
args=>\%args,
__callback => sub {
my ($events, $request) = @_;
my $j = JSON->
package Eixo::Docker::EventRegister;
use strict;
use JSON;
use IO::Select;
use Eixo::Docker::EventPool;
use Eixo::Docker::Event;
sub new{
return bless({
api=>$_[1],
frequency=>$_[2],
pid
->getline){
push @lines, $l;
}
foreach(grep { $_ =~ /\w/ } @lines){
push @{$self->{pool}}, JSON->new->decode($_);
}
}
sub __runEvents{
my ($self) = @_;
foreach my $e (@{$self->{pool}}){
l dev libraries installed in system.
In ubuntu/debian:
apt-get install libssl-dev
=item *
JSON >= 2.50,
=item *
Net::HTTP >= 6.06,
=item *
HTTP::Server::Simple::CGI (for testing purpose)
TA.json' ) {
$struct = $self->meta_from_file( 'META.json' );
}
elsif ( -e 'META.yml' ) {
$struct = $self->meta_from_file( 'META.yml' );
}
else {
die "There is no 'META.json' n
package Eixo::Docker;
use 5.008;
use strict;
use warnings;
use Eixo::Base::Clase;
use JSON;
use Net::HTTP;
use Eixo::Rest::Client;
# Items to export into callers namespace by default. Note: do not
package Eixo::Docker::EventPool;
use strict;
use IO::Handle;
use JSON;
sub new{
return bless({
filter=>$_[1] || undef,
api=>$_[2],
frequency=>$_[3]
}, $_[0]);
}
sub create{
my ($se
Events{
my ($self, $events) = @_;
my $w = $self->{writer};
my $json = JSON->new;
foreach my $e (@{$events->{Events}}){
print $w $json->encode($e) . "\n";
}
$events->{Events} = [];
}
1;
];
run ( command => $cmd, verbose => 0 );
}
if ( -e 'MYMETA.json' ) {
$struct = $self->meta_from_file( 'MYMETA.json' );
}
elsif ( -e 'MYMETA.yml' ) {
$struct = $self->meta_fro
l dev libraries installed in system.
In ubuntu/debian:
apt-get install libssl-dev
=item *
JSON >= 2.50,
=item *
Net::HTTP >= 6.06,
=item *
HTTP::Server::Simple::CGI (for testing purpose)
ue = encode_utf8($self->{'val'});
$node->appendText($value);
return $node;
}
sub TO_JSON {
my $self = shift;
my $class = ref($self);
$class =~ s/VMOMI:://;
return {_clas
}
return $key->generate($size);
}
sub read_key {
my $class = shift;
my ($type, $json_string_key) = @_;
if (!exists $POLICY{uc $type}) {
croak "unsupported key type: $typ
{
croak "$type: $@";
}
return $key->read($json_string_key);
}
sub to_string {
return Crypt::Keyczar::Util::encode_json($_[0]->expose);
}
1;
package Crypt::Keyczar::_NullSignE
= 0;
if ($res->is_success) {
$ok = 1;
if ($ct eq 'application/json') {
my $coder = JSON::XS->new->ascii->pretty->allow_nonref;
$data = $coder->decode($conte
return $expose;
}
sub read {
my $class = shift;
my $json_string = shift;
my $obj = Crypt::Keyczar::Util::decode_json($json_string);
my $self = bless $obj, $class;
$self->init()
hift;
my $json_key = undef;
return $json_key;
}
sub get_metadata {
croak "Please override, 'Crypt::Keyczar::Reader' is abstract class";
my $self = shift;
my $json_metadata = un
def;
return $json_metadata;
}
1;
__END__
return $expose;
}
sub read {
my $class = shift;
my $json_string = shift;
my $obj = Crypt::Keyczar::Util::decode_json($json_string);
my $self = bless $obj, $class;
$self->{publi
ndler = $args->{handler};
my $index = $args->{dir_index};
my $enable_json = $args->{enable_json};
my $auto_index = $args->{auto_index} // 1;
my $css = $args->{css}
$c->stash(css => $css),
render_indexes( $c, $path, $render_opts, $enable_json )
unless ( $c->tx->res->code );
}
}
}
);
$c->reply->asset($asset);
}
sub render_indexes {
my ( $c, $dir, $render_opts, $enable_json ) = @_;
my @files =
( $c->req->url eq '/' )
? ()
: ( { url => '../',
>{aesKeyString}) }
sub read {
my $class = shift;
my $json_string = shift;
my $obj = Crypt::Keyczar::Util::decode_json($json_string);
my $self = bless $obj, $class;
$self->{hmacK
return $expose;
}
sub read {
my $class = shift;
my $json_string = shift;
my $obj = Crypt::Keyczar::Util::decode_json($json_string);
my $self = bless $obj, $class;
$self->{publi
r beanstalk queues
=head1 SYNOPSIS
use AnyEvent::Beanstalk::Worker;
use Data::Dumper;
use JSON;
my $w = AnyEvent::Beanstalk::Worker->new(
concurrency => 10,
initial_state
ved',
beanstalk_watch => 'jobs',
beanstalk_decoder => sub {
eval { decode_json(shift) };
}
);
$w->on(reserved => sub {
my $self = shift;
my ($qjob, $qres
a} = Mojo::UserAgent->new }
1;
Now we can use our B<WebWorker> class:
use WebWorker;
use JSON;
my $w = WebWorker->new(
concurrency => 50,
initial_state => 'reserved',