Group
Extension

Matches 35358

disbatch ( A/AS/ASHLEYW/disbatch-4.103.tar.gz, ASHLEYW, 2019; MetaCPAN )
disbatch/bin/disbatch.pl ( view source; MetaCPAN )
use 5.12.0;
use warnings;

use Data::Dumper;
use File::Slurp;
use Getopt::Long;
use IO::Wrap;
use JSON;
use LWP::UserAgent;
use Pod::Usage;
use Text::CSV_XS;
use Text::Table;
use Try::Tiny;

my $url =
ocalhost:8080';
my $username;
my $password;
my $help = 0;
my $config_file = '/etc/disbatch/config.json';
my $ssl_ca_file;
my $disable_ssl_verification = 0;

GetOptions(
    'url|u=s'       => \$url,
 
ication,
);

pod2usage(-verbose => 2, -exitval => 0) if $help;
pod2usage(1) unless @ARGV;

my $json = JSON->new;

my $options = {};
if (defined $ssl_ca_file) {
    $options->{ssl_opts}{SSL_ca_file} = 
Mojolicious-Plugin-Web-Auth ( H/HA/HAYAJO/Mojolicious-Plugin-Web-Auth-0.17.tar.gz, HAYAJO, 2019; MetaCPAN )
Mojolicious-Plugin-Web-Auth/lib/Mojolicious/Plugin/Web/Auth/OAuth.pm ( view source; MetaCPAN )
:OAuth;

use Mojo::Base 'Mojolicious::Plugin::Web::Auth::Base';
use Net::OAuth::Client;
use Mojo::JSON;

has 'request_token_url';
has is_v1a           => 0;
has token_key        => 'token';
has token_
or}->( $res->decoded_content )
            unless ( $res->is_success );
        push @args, Mojo::JSON::j( $res->decoded_content );
    } else {
        push @args, undef;
    }

    return $callback-
Mojolicious-Plugin-Web-Auth ( H/HA/HAYAJO/Mojolicious-Plugin-Web-Auth-0.17.tar.gz, HAYAJO, 2019; MetaCPAN )
Mojolicious-Plugin-Web-Auth/lib/Mojolicious/Plugin/Web/Auth/OAuth2.pm ( view source; MetaCPAN )
d %s', $res->code, $res->default_message ) )
            if $tx->error;
        push @args, $res->json;
    } else {
        push @args, undef;
    }

    push @args, { %$dat }; # append rest of the r
->type(json => ['application/json', 'text/javascript']);
    my $exts = $types->detect( $res->headers->content_type );
    return ( scalar(@$exts) && $exts->[0] eq 'json' )
        ? $res->json
      
Limper ( A/AS/ASHLEYW/Limper-0.015.tar.gz, ASHLEYW, 2019; MetaCPAN )
Limper/lib/Limper.pm ( view source; MetaCPAN )
zens that L<Dancer> pulls in.

B<Limper> is modular - support for serving files, easily returning JSON, or
using PSGI can be included if and only if needed (and these features already
exist on CPAN).
ng to Limper, see L<Limper::Sugar>.

For sending files and easily sending JSON, see L<Limper::SendFile> and L<Limper::SendJSON>.

For differences between Limper and Dancer, see L<Limper::Differences>.
ad1 SEE ALSO

L<Limper::Differences>

L<Limper::Extending>

L<Limper::Engine::PSGI>

L<Limper::SendFile>

L<Limper::SendJSON>

L<Limper::Sugar>

L<App::FatPacker>

L<IO::Socket::INET>

L<Web::Simple>
Limper ( A/AS/ASHLEYW/Limper-0.015.tar.gz, ASHLEYW, 2019; MetaCPAN )
Limper/example2.pl ( view source; MetaCPAN )
sr/bin/env perl

# more complex example returning JSON or static content

use 5.10.0;
use strict;
use warnings;

use Limper;
use File::Slurp;
use JSON;

my $document_root = './public/';

my $static = 
;
        'blegh';
    }
};

my $generic = sub {
    headers('Content-Type' => 'application/json');
    JSON->new->encode({status => 'OK'});
};

get qr{^/} => $static;
post qr{^/} => $generic;

limp(L
WebService-Pixela ( A/AN/ANATOFUZ/WebService-Pixela-0.021.tar.gz, ANATOFUZ, 2019; MetaCPAN )
WebService-Pixela/lib/WebService/Pixela/Pixel.pm ( view source; MetaCPAN )
^-?[0-9]+ float^-?[0-9]+.[0-9]+

=item C<< optional_data : json_string >>

Additional information other than quantity. It is specified as JSON string.
The amount of this data must be less than 10 KB.
^-?[0-9]+ float^-?[0-9]+.[0-9]+

=item C<< optional_data : json_string >>

Additional information other than quantity. It is specified as JSON string.
The amount of this data must be less than 10 KB.
WebService-Pixela ( A/AN/ANATOFUZ/WebService-Pixela-0.021.tar.gz, ANATOFUZ, 2019; MetaCPAN )
WebService-Pixela/lib/WebService/Pixela/Webhook.pm ( view source; MetaCPAN )
bService::Pixela::Webhook;
use 5.010001;
use strict;
use warnings;
use Carp qw/croak/;
use JSON qw/decode_json/;

our $VERSION = "0.021";

sub new {
    my ($class,$pixela_client) = @_;
    return ble
der('POST',$path,$params);

    my $res_json = $self->client->decode() ? $res : decode_json($res);

    if($res_json->{isSuccess}){
        $self->hash($res_json->{webhookHash});
    }

    return $re
se WebService::Pixela;

    # All WebService::Pixela methods use this token and user name in URI, JSON, etc.
    my $pixela = WebService::Pixela->new(token => "thisissecret", username => "testname");
WebService-Pixela ( A/AN/ANATOFUZ/WebService-Pixela-0.021.tar.gz, ANATOFUZ, 2019; MetaCPAN )
WebService-Pixela/lib/WebService/Pixela/Graph.pm ( view source; MetaCPAN )
se WebService::Pixela;

    # All WebService::Pixela methods use this token and user name in URI, JSON, etc.
    my $pixela = WebService::Pixela->new(username => $username, token => $token);
    my $g
initions.

If you setting I<$pixela->decode(1) [default]> return array refs.
Otherwise it returns json.

See Also L<https://docs.pixe.la/#/get-graph>

=head4 C<< $pixela->graph->get_svg(%args) >>

I<%
WebService-Pixela ( A/AN/ANATOFUZ/WebService-Pixela-0.021.tar.gz, ANATOFUZ, 2019; MetaCPAN )
WebService-Pixela/lib/WebService/Pixela/User.pm ( view source; MetaCPAN )
se WebService::Pixela;

    # All WebService::Pixela methods use this token and user name in URI, JSON, etc.
    my $pixela = WebService::Pixela->new(token => "thisissecret", username => "testname");
Taskwarrior-Kusarigama ( Y/YA/YANICK/Taskwarrior-Kusarigama-0.12.0.tar.gz, YANICK, 2019; MetaCPAN )
Taskwarrior-Kusarigama/lib/Taskwarrior/Kusarigama/Core.pm ( view source; MetaCPAN )
strict;
use warnings;

use Path::Tiny;

use Moo::Role;

use MooseX::MungeHas;

use IPC::Run3;
use JSON;
use Module::Runtime qw/ use_module /;
use List::AllUtils qw/ uniq /;

use experimental 'postdere
task rc.recurrence=no rc.hooks=off export /, @query], undef, \my $out;

    return eval { @{ from_json $out } };
}


sub  new_task {
    my ( $self, $task ) = @_;
    $task ||= {};

    return Taskwar
ew( $self->run_task, $task );
}


sub import_task {
    my( $self, $task ) = @_;

    my $in = to_json $task;

    run3 [qw/ task rc.recurrence=no import /], \$in;
}


sub calc {
    my( $self, @stuff
Mojolicious-Plugin-Web-Auth ( H/HA/HAYAJO/Mojolicious-Plugin-Web-Auth-0.17.tar.gz, HAYAJO, 2019; MetaCPAN )
Mojolicious-Plugin-Web-Auth/lib/Mojolicious/Plugin/Web/Auth/Site/Yandex.pm ( view source; MetaCPAN )
  => 'code';
has access_token_url => 'https://oauth.yandex.ru/token';
has user_info_url    => 'https://login.yandex.ru/info?format=json';
has authorize_header => 'OAuth';

sub moniker {'yandex'};

1;
Net-NATS-Client ( C/CA/CARWYNM/Net-NATS-Client-0.2.2.tar.gz, CARWYNM, 2019; MetaCPAN )
Net-NATS-Client/lib/Net/NATS/Client.pm ( view source; MetaCPAN )
       'current_sid',
        'message_count',
    ],
};

use strict;
use warnings;

use URI;
use JSON;

use Net::NATS::Connection;
use Net::NATS::Message;
use Net::NATS::ServerInfo;
use Net::NATS::Co
     or return;

        $self->connection($connection);
    }

    my $connect = 'CONNECT ' . to_json($connect_info, { convert_blessed => 1});
    $self->connection->send($connect);

    return 1;
}
 ', $line);
}

sub handle_info {
    my $self = shift;
    my (@args) = @_;
    my $hash = decode_json($args[0]);
    return Net::NATS::ServerInfo->new(%$hash);
}

sub parse_msg {
    my $self = shift
Geo-OGC-Service-WFS ( A/AJ/AJOLMA/Geo-OGC-Service-WFS-0.11.tar.gz, AJOLMA, 2019; MetaCPAN )
Geo-OGC-Service-WFS/lib/Geo/OGC/Service/WFS.pm ( view source; MetaCPAN )

use Carp;
use File::Basename;
use Modern::Perl;
use Capture::Tiny ':all';
use Clone 'clone';
use JSON;
use DBI;
use Geo::GDAL;
use HTTP::Date;
use File::MkTemp;

use Data::Dumper;
use XML::LibXML::Pr
ree' => 'GML3Deegree',
    'application/gml+xml; version=3.2' => 'GML3.2',
    'application/json' => 'GeoJSON',
);

our @GDAL_GML_Creation_options = (qw/XSISCHEMAURI XSISCHEMA PREFIX
STRIP_PREFIX TARG
) }
    }
}

=pod

=head3 GetCapabilities

Service the GetCapabilities request. The configuration JSON is used to
control the contents of the reply. The config contains root keys, which
are either sim
Net-NATS-Client ( C/CA/CARWYNM/Net-NATS-Client-0.2.2.tar.gz, CARWYNM, 2019; MetaCPAN )
Net-NATS-Client/lib/Net/NATS/ConnectInfo.pm ( view source; MetaCPAN )
lf->pedantic;
    $self->ssl_required(0) unless $self->ssl_required;

    return $self;
}

sub TO_JSON {
    my $self = shift;
    my $hash = { %{ $self } };
    $hash->{verbose} = $self->verbose ? \1
Taskwarrior-Kusarigama ( Y/YA/YANICK/Taskwarrior-Kusarigama-0.12.0.tar.gz, YANICK, 2019; MetaCPAN )
Taskwarrior-Kusarigama/lib/Taskwarrior/Kusarigama/Plugin/Command/Github.pm ( view source; MetaCPAN )
re JSON;
    my %filter = ( state => 'open' );
    $filter{assignee} = $self->tw->config->{github}{user} unless $self->tw->config->{github}{user} eq $org;

    my $user_filter = eval {
        JSON::f
rom_json $self->tw->{config}{project}{$project}{filter}
    };

    %filter = ( %filter, %$user_filter ) if $user_filter;

    say "syncing tickets for $org/$repo...";

    my %tasks = map { $_->{gh_i
ady found locally";

    say "fetching open tickets from Github...";
    say "using filter ", JSON::to_json( \%filter );

    my @issues = $self->github->issue->repos_issues(
        $org, $repo, \%fi
OpenStack-MetaAPI ( A/AT/ATOOMIC/OpenStack-MetaAPI-0.003.tar.gz, ATOOMIC, 2019; MetaCPAN )
OpenStack-MetaAPI/lib/OpenStack/MetaAPI/API/Network.pm ( view source; MetaCPAN )
 -i -X POST http://service01a-c2.cpanel.net:9696/v2.0/floatingips
# -H "Content-Type: application/json" -H "User-Agent: openstacksdk/0.27.0 keystoneauth1/3.13.1 python-requests/2.21.0 CPython/3.6.6" -
AnyEvent-HTTPD-Router ( U/UF/UFOBAT/AnyEvent-HTTPD-Router-1.0.1.tar.gz, UFOBAT, 2019; MetaCPAN )
AnyEvent-HTTPD-Router/lib/AnyEvent/HTTPD/Router.pm ( view source; MetaCPAN )
st;
         $reg->respond([
             200, 'ok', { 'Content-Type' => 'application/json'},
             to_json($calendar_entries)
         ]);
     },
     GET => '/static-files/*' => sub {
      
disbatch ( A/AS/ASHLEYW/disbatch-4.103.tar.gz, ASHLEYW, 2019; MetaCPAN )
disbatch/lib/Disbatch/Web/V3.pm ( view source; MetaCPAN )
= '4.103';
use 5.12.0;
use warnings;

use Cpanel::JSON::XS;
use Disbatch::Web;	# exports: parse_params send_json_options template
use Limper::SendJSON;
use Limper;
use MongoDB::OID 1.0.4;
use Safe::Is
##########

get '/scheduler-json' => sub {
    undef $disbatch->{mongo};
    send_json $disbatch->scheduler_report_old_api, send_json_options;
};

post '/set-queue-attr-json' => sub {
    undef $disba
;
        return send_json { success => 0, error => 'Invalid attr'}, send_json_options;
    }
    unless (defined $params->{value}) {
        status 400;
        return send_json {success => 0, error 
Taskwarrior-Kusarigama ( Y/YA/YANICK/Taskwarrior-Kusarigama-0.12.0.tar.gz, YANICK, 2019; MetaCPAN )
Taskwarrior-Kusarigama/lib/Taskwarrior/Kusarigama/Hook.pm ( view source; MetaCPAN )

use Path::Tiny;
use Hash::Merge qw/merge /;
use List::AllUtils qw/ reduce pairmap pairmap /;
use JSON;

use experimental 'postderef';

with 'Taskwarrior::Kusarigama::Core';


has raw_args => (
    is
hod = join '_', 'run', $event;

    my @plugins = $self->plugins->@*;

    my @tasks = map { from_json($_) } <STDIN>;

    try {
        $self->$method(\@plugins,@tasks);
    }
    catch {
        say
on_add($task) for grep { $_->DOES('Taskwarrior::Kusarigama::Hook::OnAdd') } @$plugins;
    say to_json($task);
}


# TODO document the $old, $new, $diff

sub run_modify {
    my( $self, $plugins, $old
Taskwarrior-Kusarigama ( Y/YA/YANICK/Taskwarrior-Kusarigama-0.12.0.tar.gz, YANICK, 2019; MetaCPAN )
Taskwarrior-Kusarigama/lib/Taskwarrior/Kusarigama/Wrapper.pm ( view source; MetaCPAN )
 my( $self, $task ) = @_;

    require JSON;

    my $id = $task->{uuid} || '+LATEST';

    my $json = JSON::to_json([ $task ]);

    $self->RUN('import', \$json );

    my ( $new ) = $self->export($i
xport {
    my( $self, @args ) = @_;
    require JSON;

    return map {
        Taskwarrior::Kusarigama::Task->new( $self => $_ )
    } JSON::from_json( join '', $self->RUN( export => @args ) )->@*;

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