than in an installed location) ?
my $in_repo;
foreach (qw/.gitignore Changes META.json Meta.yml README README.md dist.ini/) {
$path->child($_)->exists and do { $in_repo=1;
ow_dirty = qw(dist.ini Changes);
my %boilerplate = (
distmeta => [qw(cpanfile Meta.yml META.json)],
installer => [qw(Build.PL Makefile.PL ppport.h)],
readme => [qw(README README.md
0,
-doc => "Skip copying files from the build/release : ('Makefile.PL', 'cpanfile',' Meta.json', ...).",
);
has no_coverage => (
isa => 'Bool',
default => 0,
-doc => "O
:lib" }
if $self->auto_prereqs;
plugin 'PrereqsFile' if -e 'prereqs.yml' || -e 'prereqs.json';
plugin 'MetaNoIndex' => {
directory => [ sort( qw(t xt), qw(corpus demo eg examples
n metadata
use Carp;
use File::Find::Rule;
use File::Basename;
use File::Spec;
use IO::File;
use JSON;
use List::Util qw(first max);
use Path::Class ();
use XML::LibXML;
use XML::LibXML::PrettyPrint;
b usage_desc {
return "opmbuild sopm [--config <json_file>] [--cvs] <path_to_module>";
}
sub opt_spec {
return (
[ 'config=s', 'JSON file that provides all the metadata' ],
[
} ) {
my @json_files = File::Find::Rule->file->name( '*.json' )->in( $args->[0] || '.' );
@json_files > 1 ?
$self->usage_error( 'found more than one json file, please spec
rviceHistory' => 1,'Kernel::System::Group' => 1,'Kernel::System::HTMLUtils' => 1,'Kernel::System::JSON' => 1,'Kernel::System::LinkObject' => 1,'Kernel::System::LinkObject::Appointment' => 1,'Kernel::S
=> 1,'IO::String' => 1,'JSON' => 1,'JSON::PP' => 1,'JSON::PP::Boolean' => 1,'JSON::backportPP' => 1,'JSON::backportPP::Boolean' => 1,'JSON::backportPP::Compat5005' => 1,'JSON::backportPP::Compat5006'
::Email::qmail' => 1,'Sisimai::Bite::JSON' => 1,'Sisimai::Bite::JSON::AmazonSES' => 1,'Sisimai::Bite::JSON::SendGrid' => 1,'Sisimai::Data' => 1,'Sisimai::Data::JSON' => 1,'Sisimai::Data::YAML' => 1,'S
L_CMAKE, L_YAML, L_COBOL, L_GUI4CLI, L_D, L_POWERSHELL, L_R, L_JSP,\
L_COFFEESCRIPT, L_JSON, L_JAVASCRIPT, L_FORTRAN_77, L_BAANC, L_SREC,\
L_IHEX, L_TEHEX, L_SWIFT,\
L_ASN1, L
_REBOL, \
L_REGISTRY, L_RUST, L_SPICE, L_TXT2TAGS, L_VISUALPROLOG,\
L_TYPESCRIPT, L_JSON5, L_MSSQL, L_GDSCRIPT, L_HOLLYWOOD,\
// Don't use L_JS, use L_JAVASCRIPT instead
//
M_LANG + 55)
#define IDM_LANG_COFFEESCRIPT (IDM_LANG + 56)
#define IDM_LANG_JSON (IDM_LANG + 57)
#define IDM_LANG_FORTRAN_77 (IDM_LANG + 58)
#d
M_LANG + 83)
#define IDM_LANG_TYPESCRIPT (IDM_LANG + 84)
#define IDM_LANG_JSON5 (IDM_LANG + 85)
#define IDM_LANG_MSSQL (IDM_LANG + 86)
#d
M_LANG_JS' => ((40000 + 6000) + 7),
'IDM_LANG_JSON' => ((40000 + 6000) + 57),
'IDM_LANG_JSP'
=> 58,
'L_JS' => 19,
'L_JSON' => 57,
'L_JSP'
# ABSTRACT: provides perl API to VisualCrossing
package VisualCrossing::API;
use JSON;
use HTTP::Tiny;
use Moo;
use strictures 2;
use namespace::clean;
our $VERSION = '1.0.0';
my $DEBUG = 0;
my $a
$response->{status} $response->{reason}\n"
unless $response->{success};
my $coder = JSON->new->utf8;
my $result = $coder->decode($response->{content});
return $result;
}
sub BUI
ub TO_JSON {return { %{shift()} };}
1;
=pod
=encoding utf-8
=head1 NAME
VisualCrossing::API - Provides Perl API to VisualCrossing
=head1 SYNOPSIS
use VisualCrossing::API;
use JSON::XS;
T: This module wraps the www.judobase.org website API.
# VERSION
use HTTP::Request;
use JSON::Tiny 'decode_json';
use Moo;
#extends 'Webservice::Judobase';
use namespace::clean;
has 'ua' => (
i
Request->new( GET => $url );
my $response = $self->ua->request($request);
return decode_json $response->content
if $response->code == 200;
return { error => 'Error retreiving co
Request->new( GET => $url );
my $response = $self->ua->request($request);
return decode_json $response->content
if $response->code == 200;
return { error => 'Error retreiving co
ervice::Judobase::Contests::VERSION = '0.10';
# VERSION
use Moo;
use HTTP::Request;
use JSON::Tiny 'decode_json';
use LWP::UserAgent;
use namespace::clean;
has 'ua' => (
is => 'ro',
r
Request->new( GET => $url );
my $response = $self->ua->request($request);
return decode_json( $response->content )->{contests}
if $response->code == 200;
return { error => 'Erro
=> 'id parameter is required' }
unless defined $args{id};
# https://data.ijf.org/api/get_json?access_token=¶ms[action]=contest.find¶ms[__ust]=¶ms[contest_code]=wc_sen2019_m_0060_0
use Webservice::Judobase::General;
use namespace::clean;
my $url = 'http://data.ijf.org/api/get_json';
my $ua = LWP::UserAgent->new;
$ua->agent("WebServiceJudobase/0.1 ");
has 'competitor' => (
DateTime' => 'timestamp',
'DateTime::Tiny' => 'timestamp',
'JSON::PP::Boolean' => 'boolean',
'Time::Moment' => 'timestamp',
'Time::
service::Judobase::General::VERSION = '0.10';
# VERSION
use Moo;
use HTTP::Request;
use JSON::Tiny 'decode_json';
use LWP::UserAgent;
use namespace::clean;
has 'ua' => (
is => 'ro',
r
Request->new( GET => $url );
my $response = $self->ua->request($request);
return decode_json $response->content
if $response->code == 200;
return { error => 'Error retreiving co
Request->new( GET => $url );
my $response = $self->ua->request($request);
return decode_json $response->content
if $response->code == 200;
return { error => 'Error retreiving co
Config::INI::Reader;
use Carp qw( croak );
use Mojo::UserAgent;
use Mojo::URL;
use Mojo::JSON qw( decode_json );
use Type::Params -sigs;
use experimental qw( signatures );
warnings::warnif( 'depreca
dits;
if ( $self->debug ) {
$self->_debug( $response->body );
}
return decode_json( $response->body );
}
# an easy target to override for testing
sub _GET ( $self, $url ) {
$s
T: This module wraps the www.judobase.org website API.
# VERSION
use HTTP::Request;
use JSON::Tiny 'decode_json';
use Moo;
#extends 'Webservice::Judobase';
use namespace::clean;
has 'ua' => (
i
se = $self->ua->request($request);
if ( $response->code == 200 ) {
my $data = decode_json $response->content;
return $data->{competitors};
}
return { error => 'Error ret
se = $self->ua->request($request);
if ( $response->code == 200 ) {
my $data = decode_json $response->content;
return $data;
}
return { error => 'Error retreiving country
iki_dir with_lock to_url);
use File::Slurper qw(read_binary write_binary);
use Mojo::JSON qw(decode_json encode_json);
use Net::IDN::Encode qw(domain_to_ascii);
use List::Util qw(first any none);
use
/oracle.json";
return decode_json read_binary("$dir/oracle.json");
}
sub save_data {
my ($stream, $host, $data) = @_;
my $dir = wiki_dir($host, $oracle_space);
my $bytes = encode_json $data;
a successful call.
with_lock($stream, $host, $oracle_space, sub {
write_binary("$dir/oracle.json", $bytes)});
}
sub new_number {
my $data = shift;
while (1) {
my $n = int(rand(10000));
use v5.20;
use warnings;
use feature 'signatures';
no warnings qw(experimental::signatures);
use JSON ();
use HTTP::Tiny;
our $VERSION = '0.0.1';
package Net::OSV {
sub new ($class) {
return
'https://api.osv.dev/v1/query',
{ content => JSON::encode_json(\%options) },
);
return $res->{success} ? (JSON::decode_json($res->{content}))->{vulns}->@* : ();
}
sub query_ba
'https://api.osv.dev/v1/querybatch',
{ content => JSON::encode_json(\%options) },
);
return $res->{success} ? (JSON::decode_json($res->{content}))->{results}->@* : ();
}
sub vuln (
# Lightweight client for the RPC-Switch json-rpc request multiplexer
#
# see: RPC::Switch: https://github.com/a6502/rpc-switch
# RPC::Switch::Client: https://metacpan.org/pod/RPC::Switch::Client
#
package RPC::Switch::Client::Tiny;
use strict;
use warnings;
use Carp 'croak';
use JSON;
use IO::Select;
use IO::Socket::SSL;
use Time::HiRes qw(time);
use RPC::Switch::Client::Tiny::Error;
use RP
ert
} else {
$self->{auth_method} = 'password' unless exists $self->{auth_method};
}
$self->{json_utf8} = $self->{client_encoding_utf8} ? {} : {utf8 => 1};
return $self;
}
sub rpc_error {
retu
ient::Tiny::SessionCache;
sub trace_cb {
my ($type, $msg) = @_;
printf "%s: %s\n", $type, to_json($msg, {pretty => 0, canonical => 1});
}
my $cache = RPC::Switch::Client::Tiny::SessionCache-