Group
Extension

Matches 35359

WebService-Reddit ( O/OA/OALDERS/WebService-Reddit-0.000003.tar.gz, OALDERS, 2017; MetaCPAN )
WebService-Reddit/lib/WebService/Reddit/Response.pm ( view source; MetaCPAN )
:Reddit::Response;
$WebService::Reddit::Response::VERSION = '0.000003';
use Moo;

use JSON::MaybeXS qw( decode_json );
use Types::Standard qw( Bool InstanceOf Maybe HashRef );

has content => (
    is
my $self    = shift;
    my $content = $self->raw->decoded_content;

    return $content ? decode_json($content) : undef;
}

sub _build_success {
    my $self = shift;
    return $self->raw->is_succes
item raw

An L<HTTP::Response> object.

=back

=head1 METHODS

=head2 content

This is the parsed JSON body of the response.  Generally this will be a C<HashRef>.

=head2 raw

Returns the raw L<HTTP::
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Task/Getjobs.pm ( view source; MetaCPAN )
 warnings;
use base 'Armadito::Agent::Task';

use Armadito::Agent::Storage;
use Data::Dumper;
use JSON;

sub new {
	my ( $class, %params ) = @_;

	my $self = $class->SUPER::new(%params);

	if ( $param
= @_;

	$self->{logger}->info( "Successful Response : " . $response->content() );
	my $obj = from_json( $response->content(), { utf8 => 1 } );

	if ( defined( $obj->{jobs} ) && ref( $obj->{jobs} ) eq 
se ) = @_;

	$self->{logger}->info( "Error Response : " . $response->content() );
	my $obj = from_json( $response->content(), { utf8 => 1 } );
	$self->{logger}->error( Dumper($obj) );

	return $self;
JS-SourceMap ( A/AT/ATTILA/JS-SourceMap-0.1.2.tar.gz, ATTILA, 2017; MetaCPAN )
JS-SourceMap/lib/JS/SourceMap/Decoder.pm ( view source; MetaCPAN )
string);

=head1 DESCRIPTION

=cut

package JS::SourceMap::Decoder;
use strict;
use warnings;
use JSON;
use JS::SourceMap::Token;
use JS::SourceMap::Index qw/token_index/;
use vars qw($B64chrs @B64);
ce.  Options:

=over 8

=item * json_options => $options_as_arrayref

Specify an array of options to pass to the L<JSON> constructor when
parsing JSON.  We use the JSON defaults unless this option is 
y $json = JSON->new($self->opt('json_options'))->decode($string);
	my @sources = @{$json->{'sources'}};
	my $sourceRoot = $json->{'sourceRoot'} if exists $json->{'sourceRoot'};
	my @names = @{$json->{
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/HTTP/Client/ArmaditoGLPI.pm ( view source; MetaCPAN )
g2($url) if $self->{logger};

	my $headers = HTTP::Headers->new(
		'Content-Type' => 'application/json',
		'Referer'      => $url
	);

	my $request = HTTP::Request->new(
		$params{method} => $url,
		$
eURL method. If this is a POST request, a message must be given in params. This should be a valid JSON message.

The following parameters are allowed, as keys of the %params hash :

=over

=item I<url
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Task/Alerts.pm ( view source; MetaCPAN )
e Armadito::Agent::Task::Alerts;

use strict;
use warnings;
use base 'Armadito::Agent::Task';
use JSON;
use Data::Dumper;

sub new {
	my ( $class, %params ) = @_;

	my $self = $class->SUPER::new(%para
se ) = @_;

	$self->{logger}->info( "Error Response : " . $response->content() );
	my $obj = from_json( $response->content(), { utf8 => 1 } );
	$self->{logger}->error( Dumper($obj) );

	return $self;
my $json_text = to_json( $self->{jobj} );
	$self->{logger}->debug($json_text);

	my $response = $self->{glpi_client}->sendRequest(
		"url"   => $self->{glpi_url} . "/api/alerts",
		message => $json_te
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Task/Enrollment.pm ( view source; MetaCPAN )
e 'Armadito::Agent::Task';
use Armadito::Agent::Tools::File qw( readFile );
use Data::Dumper;
use JSON;

sub new {
	my ( $class, %params ) = @_;

	my $self = $class->SUPER::new(%params);

	if ( $param


	$self = $self->SUPER::run(%params);

	$self->_setEnrollmentKey();

	my $json_text = to_json( $self->{jobj} );
	print $json_text. "\n";

	my $response = $self->{glpi_client}->sendRequest(
		"url"   
 : " . $response->content() . "\n" );
	if ( $response->content() =~ /^\s*\{/ ) {
		my $obj = from_json( $response->content(), { utf8 => 1 } );
		$self->{logger}->error( $obj->{message} );
	}
	return $
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/HTTP/Client/ArmaditoAV.pm ( view source; MetaCPAN )
n qw{ POST };
use UNIVERSAL::require;
use URI;
use Encode;
use Data::Dumper;
use URI::Escape;
use JSON;

use Armadito::Agent::HTTP::Client::ArmaditoAV::Event;
use Armadito::Agent::HTTP::Client::Armadi
rmadito-agent',
		'Referer'    => $url
	);

	$headers->header( 'Content-Type'     => 'application/json' ) if ( $params{method} eq 'POST' );
	$headers->header( 'X-Armadito-Token' => $self->{token} )   
{
	my ( $self, $response ) = @_;

	$self->{logger}->info( $response->content() );
	my $obj = from_json( $response->content(), { utf8 => 1 } );

	# Update armadito agent_id
	if ( defined( $obj->{token}
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Task/Runjobs.pm ( view source; MetaCPAN )
ent::Task';

use Armadito::Agent::Storage;
use Data::Dumper;
use MIME::Base64;
use Try::Tiny;
use JSON;

sub new {
	my ( $class, %params ) = @_;

	my $self = $class->SUPER::new(%params);

	if ( $param
se ) = @_;

	$self->{logger}->info( "Error Response : " . $response->content() );
	my $obj = from_json( $response->content(), { utf8 => 1 } );
	$self->{logger}->error( Dumper($obj) );

	return $self;
 = @_;

	my $json_text = to_json( $self->{jobj} );

	my $response = $self->{glpi_client}->sendRequest(
		"url"   => $self->{agent}->{config}->{server}[0] . "/api/jobs",
		message => $json_text,
		meth
Geo-GDAL ( A/AJ/AJOLMA/Geo-GDAL-2.010301.tar.gz, AJOLMA, 2017; MetaCPAN )
Geo-GDAL/lib/Geo/OGR.pm ( view source; MetaCPAN )

*CreateGeometryFromGML = *Geo::OGRc::CreateGeometryFromGML;
*CreateGeometryFromJson = *Geo::OGRc::CreateGeometryFromJson;
*BuildPolygonFromEdges = *Geo::OGRc::BuildPolygonFromEdges;
*ApproximateArcAn
      }
    }
    my $gml = $param{GML} // $param{gml};
    my $json = $param{GeoJSON} // $param{geojson} // $param{JSON} // $param{json};
    my $points = $param{Points} // $param{points};
    my $ar
self = Geo::OGRc::CreateGeometryFromGML($gml);
    } elsif (defined $json) {
        $self = Geo::OGRc::CreateGeometryFromJson($json);
    } elsif (defined $type) {
        $type = Geo::GDAL::string2i
Log-Log4perl-Appender-Elasticsearch ( P/PA/PALIK/Log-Log4perl-Appender-Elasticsearch-0.09.tar.gz, PALIK, 2017; MetaCPAN )
Log-Log4perl-Appender-Elasticsearch/lib/Log/Log4perl/Appender/Elasticsearch/Bulk.pm ( view source; MetaCPAN )
$buff}) || return;

    foreach (@{$buff}) {
        $data .= join $/, '{"index":{}}', $self->_to_json($_), '';
    }

    if (_INTERNAL_DEBUG) {
        require Data::Dumper;
        print Data::Dump
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Task/Scan.pm ( view source; MetaCPAN )
 strict;
use warnings;
use base 'Armadito::Agent::Task';

use MIME::Base64;
use Data::Dumper;
use JSON;

sub new {
	my ( $class, %params ) = @_;

	my $self = $class->SUPER::new(%params);

	if ( $param
se ) = @_;

	$self->{logger}->info( "Error Response : " . $response->content() );
	my $obj = from_json( $response->content(), { utf8 => 1 } );
	$self->{logger}->error( Dumper($obj) );

	return $self;
esults;
	my $json_text = to_json( $self->{jobj} );

	my $response = $self->{glpi_client}->sendRequest(
		"url"   => $self->{agent}->{config}->{server}[0] . "/api/scans",
		message => $json_text,
		met
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Antivirus/Eset/Task/State.pm ( view source; MetaCPAN )
This task inherits from L<Armadito::Agent::Task:State>. Get Antivirus state and then send it in a json formatted POST request to Armadito plugin for GLPI.

=head1 FUNCTIONS

=head2 run ( $self, %param
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Antivirus/Eset/Task/Alerts.pm ( view source; MetaCPAN )


This task inherits from L<Armadito::Agent::Task:Alerts>. Get Antivirus' alerts and send them as json messages to armadito glpi plugin.

=head1 FUNCTIONS

=head2 run ( $self, %params )

Run the task.
App-yajg ( G/GR/GRAGORY/App-yajg-0.20.tar.gz, GRAGORY, 2017; MetaCPAN )
App-yajg/lib/App/yajg.pm ( view source; MetaCPAN )
s;
no if $] >= 5.017011, warnings => 'experimental::smartmatch';
use utf8;

use Data::Dumper;
use JSON qw();

our $VERSION = '0.20';

sub MAX_RECURSION () {300}

{
    my $inc = caller() ? $INC{ __PAC
 read_next_json_file () {
    local $/;
    local $SIG{__WARN__} = \&warn_without_line;
    while (<>) {
        utf8::encode($_) if utf8::is_utf8($_);
        $_ = eval { JSON::decode_json($_) };
   
hift;
    state $supported = {
        'ddp'  => 'App::yajg::Output::DDP',
        'json' => 'App::yajg::Output::Json',
        'perl' => 'App::yajg::Output::Perl',
        'yaml' => 'App::yajg::Outpu
App-yajg ( G/GR/GRAGORY/App-yajg-0.20.tar.gz, GRAGORY, 2017; MetaCPAN )
App-yajg/lib/App/yajg/Hooks.pm ( view source; MetaCPAN )
;

use JSON qw();

sub boolean_to_scalar_ref {
    return unless JSON::is_bool($_[0]);
    $_[0] = $_[0]
      ? \(my $t = 1)
      : \(my $f = 0);
}

sub boolean_to_int {
    return unless JSON::is_b
ool($_[0]);
    $_[0] = int(!!$_[0]);
}

sub boolean_to_str {
    return unless JSON::is_bool($_[0]);
    $_[0] = $_[0]
      ? 'true'
      : 'false';
}

sub _decode_uri ($) {
    local $_ = shift //
Log-Log4perl-Appender-Elasticsearch ( P/PA/PALIK/Log-Log4perl-Appender-Elasticsearch-0.09.tar.gz, PALIK, 2017; MetaCPAN )
Log-Log4perl-Appender-Elasticsearch/lib/Log/Log4perl/Appender/Elasticsearch.pm ( view source; MetaCPAN )

our @ISA = qw(Log::Log4perl::Appender);

use Carp;
use HTTP::Headers();
use HTTP::Request();
use JSON;
use LWP::UserAgent();
use Log::Log4perl;
use MIME::Base64;
use URI;

=head1 NAME

Log::Log4perl:
_type};
} ## end sub type

sub log {
    my ($self, %p) = @_;
    $self->_send_request($self->_to_json($self->_prepare_body(%p)));
}

sub _init {
    my ($self, %p) = @_;

    defined($p{nodes})
     
, $uri) = @_;
    my $h = $self->{_headers}->clone;
    $h->header('Content-Type' => 'application/json');

    my $ui = $uri->userinfo;
    if ($ui) {
        my $auth = MIME::Base64::encode_base64($u
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/HTTP/Client/ArmaditoAV/Event/StatusEvent.pm ( view source; MetaCPAN )
vent;

use strict;
use warnings;
use base 'Armadito::Agent::HTTP::Client::ArmaditoAV::Event';
use JSON;

sub new {
	my ( $class, %params ) = @_;

	my $self = $class->SUPER::new(%params);

	return $sel
>{jobj}->{task}->{obj} = $obj;
	my $json_text = to_json( $self->{taskobj}->{jobj} );
	print "JSON formatted str : \n" . $json_text . "\n";

	$self->_sendToGLPI($json_text);
	$self->{end_polling} = 1;
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Antivirus/Eset/Task/Scan.pm ( view source; MetaCPAN )
Armadito::Agent::Task:Scan>. Launch an Antivirus on-demand scan and then send a brief report in a json formatted POST request to Armadito plugin for GLPI.

=head1 FUNCTIONS

=head2 run ( $self, %param
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/Antivirus/Kaspersky/Task/Alerts.pm ( view source; MetaCPAN )


This task inherits from L<Armadito::Agent::Task:Alerts>. Get Antivirus' alerts and send them as json messages to armadito glpi plugin.

=head1 FUNCTIONS

=head2 run ( $self, %params )

Run the task.
Armadito-Agent ( V/VH/VHAMON/Armadito-Agent-0.10.1.tar.gz, VHAMON, 2017; MetaCPAN )
Armadito-Agent/lib/Armadito/Agent/HTTP/Client/ArmaditoAV/Event/OnDemandCompletedEvent.pm ( view source; MetaCPAN )
ent;

use strict;
use warnings;
use base 'Armadito::Agent::HTTP::Client::ArmaditoAV::Event';

use JSON;
use Armadito::Agent::Tools::Security qw(isANumber);

sub new {
	my ( $class, %params ) = @_;

	m
y ( $self, %params ) = @_;

	$self->{taskobj}->{jobj}->{task}->{obj} = $self->{jobj};
	my $json_text = to_json( $self->{taskobj}->{jobj} );

	my $response = $self->{taskobj}->{glpi_client}->sendReques
t(
		"url"   => $self->{taskobj}->{agent}->{config}->{server}[0] . "/api/scans",
		message => $json_text,
		method  => "POST"
	);

	if ( $response->is_success() ) {
		$self->{taskobj}->{logger}->info(

Powered by Groonga
Maintained by Kenichi Ishigaki <ishigaki@cpan.org>. If you find anything, submit it on GitHub.