use DateTime;
use Data::Dumper;
use List::Util qw(shuffle);
use List::MoreUtils qw(firstidx);
use JSON;
use Moose;
use namespace::autoclean;
extends 'HPC::Runner';
with 'MooseX::SimpleConfig';
# For
atchname};
my $json = JSON->new->allow_nonref;
my $json_text = $json->encode( $batch );
$DB::single=2;
$json_text = " --metastr \'$json_text\'";
return $json_text;
}
sub creat
File::Basename qw'dirname';
use File::Spec;
use File::Copy;
use Digest::SHA;
use Digest::MD5;
use JSON::XS;
use List::MoreUtils 'firstidx';
our $VERSION = '1.2.1'; # VERSION
has app => ( is => 'ro'
substr( $option{package}, 0, 1 ), $option{package},
"errata.json"
)
)
{
return {};
}
my $ref = decode_json(
IO::All->new(
File::Spec->catfile(
$errata_dir,
$option{arch},
substr( $option{package}, 0, 1 ), $option{package},
"errata.json"
)
)->slurp
);
my $package = $option{package};
my $arch = $option{arch};
my $vers
ge->get('/json')->to('image#get_image');
$auth_image->get('/ancestry')->to('image#get_image_ancestry');
$auth_image->get('/layer')->to('image#get_image_layer');
$auth_image->put('/json')->to('im
ION = '0.01';
use XAS::Class
debug => 0,
version => $VERSION,
base => 'XAS::Lib::RPC::JSON::Client',
;
# ----------------------------------------------------------------------
# Public Me
omp::POE::Client',
accessors => 'events',
constants => 'TRUE FALSE ARRAY',
codec => 'JSON',
filesystem => 'File',
vars => {
PARAMS => {
-hostname => { optional => 1, defaul
s
creating the standard message header, decoding the data and creating a
serialized message using JSON. This message is then sent to message queue
server.
=over 4
=item B<OBJECT>
The handle for the
The queue to send the message too.
=item B<ARG3>
The actual data to process. This is usually a JSON formated string.
=item B<ARG4>
The full qualified name of the file that was processed. This, al
sename qw'dirname';
use File::Spec;
use File::Copy;
use Rex::Repositorio::Repository_Factory;
use JSON::XS;
use Data::Dumper;
our $VERSION = '1.2.1'; # VERSION
if ( !$Rex::Repositorio::VERSION ) {
);
require Mojolicious::Commands;
# pass config to mojo app
$ENV{'REPO_CONFIG'} = encode_json( $self->config );
$ENV{'REPO_NAME'} = $option{repo};
$ENV{'MOJO_MAX_MESSAGE_SIZE'} = 1024 *
OE::Client',
mixin => 'XAS::Lib::Mixins::Handlers',
utils => 'dotid',
codec => 'JSON',
constants => 'HASH',
mutators => 'connected',
accessors => 'pubsub',
vars => {
PAR
be closer to verbatim.
=item * L<fast-matrix tail-log-to-json|https://github.com/eserte/cpan-testers-matrix/blob/master/bin/tail-log-to-json.pl>
C<CPAN::Testers::TailLog> contains similar logic to
=> 0,
version => $VERSION,
base => 'XAS::Collector::Output::Socket::Base',
codec => 'JSON',
;
#use Data::Dumper;
# ----------------------------------------------------------------------
require YAML;
sub { YAML::Dump(@_) }
} elsif ($format eq 'JSON') {
require JSON;
sub { JSON->new->utf8->canonical->encode(@_) }
} else {
print "Unknown fo
www-mobilecarrierjp-dump_all.pl --format=JSON --datdir=/path/to/output --softbank
--format=JSON 出力フォーマットを指定する(JSON または YAML を選択可能)
--da
$self->save_env;
}
=head2 workflow_load
use Config::Any to load configuration files - yaml, json, etc
=cut
sub workflow_load {
my $self = shift;
my $cfg = Config::Any->load_files(
iment a centralized syslog
gathering operationation. Even thou XAS can write to syslog or create JSON
formatted log messages and spool them directly, these modules provide a
framework that can be e
tr',
);
# TODO: Make this configurable from the command line, either by accepting some
# sort of JSON-as-command-line-argument-flag setting, or by having multiple
# attributes that *are* individually
tab:
package Rex::Repositorio::Server::Yum;
use Mojo::Base 'Mojolicious';
use Data::Dumper;
use JSON::XS;
use File::Spec;
use Params::Validate qw(:all);
use File::Basename 'dirname';
use File::Spec:
> 'XAS::Base',
utils => ':validation dotid trim',
constants => 'HASHREF',
codec => 'JSON',
accessors => 'hm',
;
# ---------------------------------------------------------------------
formatter->format($data);
=head1 DESCRIPTION
This package will take a hash and format it into a json_event for
L<Logstash|https://www.elastic.co/products/logstash>.
=head1 METHODS
=head2 format($
mestamp field into a
UTC date while formatting the datetime field into a local date. It returns
a json_event string.
=over 4
=item B<$data>
The hash to format.
=back
=head1 SEE ALSO
=over 4
=it
,
version => $VERSION,
base => 'XAS::Lib::RPC::JSON::Server',
utils => 'stat2text :validation',
constants => ':process :jsonrpc HASHREF',
vars => {
PARAMS => {
-processe
processes.
=head1 METHODS
=head2 new
This module inherits from L<XAS::Lib::RPC::JSON::Server|XAS::Lib::RPC::JSON::Server>
and takes all of the same parameters.
=head2 session_initialize
This met
y expects:
# http://sentry.readthedocs.org/en/latest/developer/client/index.html#building-the-json-packet
my $sentry_message = length($params{message}) > 1000 ? substr($params{message}, 0 , 1
move_tree';
use Digest::MD5 'md5_base64';
use Rex::Repositorio::Server::Docker::Helper::Auth;
use JSON::XS;
use Data::Dumper;
our $VERSION = '1.2.1'; # VERSION
# TODO: implement authentication and a
name} );
my $user_dir = File::Spec->catdir( $repo_dir, "users" );
my $ref = $self->req->json;
my $username = $ref->{username};
if ( !-d File::Spec->catdir( $user_dir, $username ) ) {
( $user_dir, $username, "user.json" ) )
or die($!);
my $ref = $self->req->json;
$ref->{password} = md5_base64( $ref->{password} );
print $fh encode_json($ref);
close($fh);
$
package WWW::Shorten::5gp;
use strict;
use warnings;
use Carp qw();
use JSON::MaybeXS qw(decode_json);
use URI ();
use base qw( WWW::Shorten::generic Exporter );
our @EXPORT = qw( makeashorterlink
res = $ua->get($uri);
return undef unless $res && $res->is_success;
my $content = decode_json($res->decoded_content);
return undef unless $content && $content->{url};
return $content-
$res = $ua->get($uri);
return undef unless $res && $res->is_success;
my $content = decode_json($res->decoded_content);
return undef unless $content && $content->{$url}->{target_url};
r
:
package Rex::Repositorio::Server::Docker::Helper::Auth::Plain;
use Moose;
use File::Spec;
use JSON::XS;
require IO::All;
our $VERSION = '1.2.1'; # VERSION
has user_path => ( is => 'ro' );
sub l
);
my $user_file = File::Spec->catfile( $user_dir, "user.json" );
if ( !-f $user_file ) {
return 0;
}
my $user_ref = decode_json( IO::All->new($user_file)->slurp );
if ( $user_ref->{p