Group
Extension

Matches 35358

WebService-Slack-WebApi ( M/MI/MIHYAERU/WebService-Slack-WebApi-0.19.tar.gz, MIHYAERU, 2025; MetaCPAN )
WebService-Slack-WebApi/lib/WebService/Slack/WebApi/Dialog.pm ( view source; MetaCPAN )
se warnings;
use utf8;
use feature qw/state/;

use parent 'WebService::Slack::WebApi::Base';

use JSON;

sub open {
  state $rule = Data::Validator->new(
    dialog     => { isa => 'HashRef', optional
, },
  )->with('Method', 'AllowExtra');
  my ($self, $args, %extra) = $rule->validate(@_);

  $args->{dialog} = encode_json $args->{dialog};
  return $self->request('open', { %$args, %extra });
}

1;
LMDB_File ( S/SO/SORTIZ/LMDB_File-0.14.tar.gz, SORTIZ, 2025; MetaCPAN )
LMDB_File/lib/LMDB_File.pm ( view source; MetaCPAN )
coded UTF-8 data as bytes, i.e. with
the internal perl UTF8 flag off, as expected by modules like JSON::XS.

=back

=head1 LMDB::Cursor

To construct a cursor you should call the C<Cursor> method of t
WebService-Slack-WebApi ( M/MI/MIHYAERU/WebService-Slack-WebApi-0.19.tar.gz, MIHYAERU, 2025; MetaCPAN )
WebService-Slack-WebApi/lib/WebService/Slack/WebApi/Files.pm ( view source; MetaCPAN )
hannels} = join ',', @{$args->{channels}} if exists $args->{channels};

    return $self->request_json('completeUploadExternal', {%$args, %extra});
}

# FIXME: maybe be broken... https://github.com/mi
Test-Smoke ( C/CO/CONTRA/Test-Smoke-1.84.tar.gz, CONTRA, 2025; MetaCPAN )
Test-Smoke/lib/Test/Smoke/Util/LoadAJSON.pm ( view source; MetaCPAN )
package Test::Smoke::Util::LoadAJSON;
use warnings;
use strict;

our $VERSION = '0.04';

=head1 NAME

Test::Smoke::Util::LoadAJSON - A Cpanel::JSON::XS/JSON:PP/JSON::XS Factory Class

=head1 SYNOPSIS

    use Test::Smoke::Util::LoadAJSON;
    my $json = Test::Smoke::Util::LoadAJSON->new->utf8->pretty->encode(\%data);

=head1 DESCRIPTION

This is purely a fallback factory class that helps keep our 
h a clean perl 5.14+ install that have L<JSON::PP> but not
JSON. Also people that installed L<JSON::XS> on a pre-5.14 system.

Also checks for C<$ENV{PERL_JSON_BACKEND}> to force either of the two.

=
Test-Smoke ( C/CO/CONTRA/Test-Smoke-1.84.tar.gz, CONTRA, 2025; MetaCPAN )
Test-Smoke/lib/Test/Smoke/Poster/Base.pm ( view source; MetaCPAN )
t::Smoke;
require Test::Smoke::PostQueue;

use File::Spec::Functions;
use Test::Smoke::Util::LoadAJSON;

=head1 NAME

Test::Smoke::Poster::Base - Base class for the posters to CoreSmokeDB.

=head1 DES

Named.

=over

=item smokedb_url => $some_url

=item ddir => $smoke_directory

=item jsnfile => $json_file (mktest.jsn)

=item v => $verbosity

=back

=head3 Returns

An instance of the class.

=head
et_json()

=head3 Arguments

None.

=head3 Returns

The json string that was stored in C<< $ddir/$jsnfile >>.

=head3 Exceptions

File I/O.

=cut

sub get_json {
    my $self = shift;

    my $json_fi
WebService-IdoitAPI ( M/MA/MAMAWE/WebService-IdoitAPI-0.4.6.tar.gz, MAMAWE, 2025; MetaCPAN )
WebService-IdoitAPI/bin/idoit-query.pl ( view source; MetaCPAN )
   my ($json,$jsontext,$query);

    if (exists $config->{opt}->{file}
        and my $fname = $config->{opt}->{file}) {
        local $/ = undef;
        if ($fname eq '-') {
            $jsontext = 
pen JSON query file '$fname': $!";
            $jsontext = <$fh>;
            close($fh);
        }
    }
    else {
        $jsontext = $ARGV[0];
    }
    $json = JSON->new();
    $query = $json->de
code($jsontext);
    return $query;
} # get_query();

sub initialize {
    my $config = {};
    my $opt = {};
    GetOptions($opt, qw(
        config|c=s
        file|f=s
        pretty!
        help|
Test-Smoke ( C/CO/CONTRA/Test-Smoke-1.84.tar.gz, CONTRA, 2025; MetaCPAN )
Test-Smoke/lib/Test/Smoke/Poster/HTTP_Tiny.pm ( view source; MetaCPAN )
=> $self->ua_timeout) : () ),
    );

    return $self;
}

=head2 $poster->_post_data()

Post the json to CoreSmokeDB using HTTP::Tiny.

=cut

sub _post_data {
    my $self = shift;

    $self->log_in
$self->poster);
    $self->log_debug("Report data: %s", my $json = $self->get_json);

    my $form_data = sprintf("json=%s", uri_escape($json));
    my $response = $self->ua->request(
        POST => 
onse->{content});

    return $response->{content};
}

=head2 $poster->_post_data_api()

Post the json to CoreSmokeDB using HTTP::Tiny, using the API-function.

=cut

sub _post_data_api {
    my $self
App-ReslirpTunnel ( S/SA/SALVA/App-ReslirpTunnel-0.06.tar.gz, SALVA, 2025; MetaCPAN )
App-ReslirpTunnel/lib/App/ReslirpTunnel.pm ( view source; MetaCPAN )
e Data::Validate::IP qw(is_ipv4);
use Path::Tiny;
use File::XDG;
use POSIX;
use Net::OpenSSH;
use JSON::PP;

use parent 'App::ReslirpTunnel::Logger';

use App::ReslirpTunnel::Butler;
use App::ReslirpT
shell', '-Command', "Get-DnsClientServerAddress | ConvertTo-Json");
    my @addrs;
    eval {
        for my $record (@{JSON::PP::decode_json($out)}) {
            if ($record->{InterfaceAlias} eq $if
ses}};
            }
        }
    };
    unless (@addrs) {
        $self->_warn("Failed to parse JSON output from DnsClientServerAddress", $@);
        $self->_log(debug => "Output was", $out);
    }
Test-Smoke ( C/CO/CONTRA/Test-Smoke-1.84.tar.gz, CONTRA, 2025; MetaCPAN )
Test-Smoke/lib/Test/Smoke/Poster/Curl.pm ( view source; MetaCPAN )
,
        verbose => $self->v
    );

    return $self;
}

=head2 $poster->_post_data()

Post the json to CoreSmokeDB using L<curl(1)>.

=cut

sub _post_data {
    my $self = shift;

    $self->log_in
$self->poster);
    $self->log_debug("Report data: %s", my $json = $self->get_json);

    my $form_data = sprintf("json=%s", uri_escape($json));
    my ($fh, $filename) = tempfile('curl-tsrepostXXXXXX
oreSmokeDB] %s", $response);

    return $response;
}

=head2 $poster->_post_data_api()

Post the json to CoreSmokeDB API-function using L<curl(1)>.

=cut

sub _post_data_api {
    my $self = shift;

Test-Smoke ( C/CO/CONTRA/Test-Smoke-1.84.tar.gz, CONTRA, 2025; MetaCPAN )
Test-Smoke/lib/Test/Smoke/App/SendReport.pm ( view source; MetaCPAN )
('smokedb_url') >>

=back

=cut

sub run {
    my $self = shift;

    $self->check_for_report_and_json;

    if ($self->option('mail')) {
        $self->{_mailer} = Test::Smoke::Mailer->new(
         
 }
}

=head2 $sendrpt->check_for_report_and_json()

Check for the '.rpt' and the '.jsn' file, return true if both exist.

=cut

sub check_for_report_and_json {
    my $self = shift;

    my $rptfile =
      $self->log_info("Regenerate report and json.");
        $self->regen_report_and_json();
    }
    return 1;
}

=head2 $sendrpt->regen_report_and_json()

Create a reporter object and generate the
Alien-libmaxminddb ( V/VO/VOEGELAS/Alien-libmaxminddb-2.001.tar.gz, VOEGELAS, 2025; MetaCPAN )
Alien-libmaxminddb/lib/Alien/libmaxminddb.pm ( view source; MetaCPAN )
1.0-or-later

use 5.014;
use warnings;
use utf8;

our $VERSION = 2.001;

use File::Spec qw();
use JSON::PP   qw();

sub dist_dir {
    my $class = shift;

    my $dist = $class;
    $dist =~ s/::/-/g;
ss->dist_dir;

    my $json_file = File::Spec->catfile($dist_dir, '_alien', 'alien.json');
    open my $in, '<', $json_file
        or die "Cannot read $json_file";
    my $json = do { local $/; <$in>
 };
    close $in;

    my $config = JSON::PP::decode_json($json);

    $config->{distdir} = $dist_dir;

    if ($config->{install_type} eq 'share') {
        my $inc_dir = File::Spec->catdir($dist_di
Test-Smoke ( C/CO/CONTRA/Test-Smoke-1.84.tar.gz, CONTRA, 2025; MetaCPAN )
Test-Smoke/lib/configsmoke.pod ( view source; MetaCPAN )
ile>: The report that is generated at the end of the run (I<mktest.rpt>).

=item

B<jsnfile>: The json that will be send to the Perl5CoreSmokeDB (I<mktest.jsn>).

=item

B<lfile>: Absolute location of
Klonk ( M/MA/MAUKE/Klonk-0.01.tar.gz, MAUKE, 2025; MetaCPAN )
Klonk/lib/Klonk/Routes.pm ( view source; MetaCPAN )
  'html'   => 'text/html',
    'js'     => 'text/javascript',
    'json'   => 'application/json',
    'jsonld' => 'application/ld+json',
    'text'   => 'text/plain',
);

my %bin_types = (
    'bin'  
404>).

=item C<$type>

Response type. Must be a text type (C<css>, C<csv>, C<html>, C<js>, C<json>,
C<jsonld>, C<text>), image type (C<jpeg>, C<png>, C<webp>), or the generic
C<bin> binary type (maps
Test-Smoke ( C/CO/CONTRA/Test-Smoke-1.84.tar.gz, CONTRA, 2025; MetaCPAN )
Test-Smoke/lib/Test/Smoke/App/Options.pm ( view source; MetaCPAN )
        ],
        general_options => [
            adir(),
            commit_sha(),
            jsonreport(),
            max_reports(),
            smokedb_url(),
        ],
        special_options
re the JSON report in.',
    );
}

sub jsonreport {
    return $opt->new(
        name     => 'jsonreport',
        option   => '=s',
        default  => undef,
        helptext => "Name of json repor
port',
        option => '!',
        default => $default,
        helptext => "Create the report/json files.",
    );
}

sub rptfile {
    return $opt->new(
        name => 'rptfile',
        option 
Test-Smoke ( C/CO/CONTRA/Test-Smoke-1.84.tar.gz, CONTRA, 2025; MetaCPAN )
Test-Smoke/lib/Test/Smoke/App/RepostFromArchive.pm ( view source; MetaCPAN )
  --sha <commit-sha>      Commit SHA for the smoke (repeat for more reports)

  --jsonreport <filename> The actual json-file to re-post

Override the config:

  --adir <dir>         Archive directory
 the json files from the archive.

=cut

sub pick_reports {
    my $self = shift;

    if (my $jsonreport = $self->option('jsonreport')) {
        die("Cannot find '$jsonreport'") unless -f $jsonrepor
t;
        if ($jsonreport =~ m{^ / }x) {
            $self->poster->ddir('');
        }
        else {
            $self->poster->ddir(curdir());
        }
        return ($jsonreport);
    }

    my
App-ReslirpTunnel ( S/SA/SALVA/App-ReslirpTunnel-0.06.tar.gz, SALVA, 2025; MetaCPAN )
App-ReslirpTunnel/lib/App/ReslirpTunnel/RPC.pm ( view source; MetaCPAN )
pp::ReslirpTunnel::RPC;

use Socket::MsgHdr;
use IO::Socket::UNIX;

use strict;
use warnings;
use JSON::PP;
use POSIX;

sub new {
    my $class = shift;
    my $socket = shift;
    my $self = \$socket
_bytes($len);
    utf8::decode($data);
    # warn "Packet received: $data\n";
    my $r = JSON::PP::decode_json($data);
    return $r;
}

sub _read_bytes {
    my ($self, $len) = @_;
    my $buf = "";
y ($self, $data) = @_;
    my $json = JSON::PP::encode_json($data);
    # warn "sending $json\n";
    utf8::encode($json);
    my $bytes = pack("N", length $json) . $json;
    while (length $bytes) {
Test-Smoke ( C/CO/CONTRA/Test-Smoke-1.84.tar.gz, CONTRA, 2025; MetaCPAN )
Test-Smoke/lib/Test/Smoke/Poster/LWP_UserAgent.pm ( view source; MetaCPAN )
string(),
        %extra_args
    );

    return $self;
}

=head2 $poster->_post_data()

Post the json to CoreSmokeDB using LWP::UserAgent.

=cut

sub _post_data {
    my $self = shift;

    $self->lo
    $self->log_debug("Report data: %s", my $json = $self->get_json);

    my $response = $self->ua->post(
        $self->smokedb_url,
        { json => $json }
    );
    if ( !$response->is_success )
elf->poster);
    $self->log_debug("Report data: %s", my $json = $self->get_json);

    my $post_data = sprintf(qq/{"report_data": %s}/, $json);

    require HTTP::Request;
    require HTTP::Headers;
Test-Smoke ( C/CO/CONTRA/Test-Smoke-1.84.tar.gz, CONTRA, 2025; MetaCPAN )
Test-Smoke/lib/Test/Smoke/Reporter.pm ( view source; MetaCPAN )
;
use Cwd;
use Encode qw( decode encode );
use File::Spec::Functions;
use Test::Smoke::Util::LoadAJSON;
use POSIX qw( strftime );
use System::Info;
use Test::Smoke::Util qw(
    grepccmsg grepnonfatal
end_log send_out user_note/, grep m/^_/ => keys %rpt;

    my $json = JSON->new->utf8(1)->pretty(1)->encode(\%rpt);

    # write the json to file:
    my $jsn_file = catfile($self->{ddir}, $self->{jsn
$json;
        close $jsn;
        $self->log_info("Write to '%s': ok", $jsn_file);
    }
    else {
        $self->log_warn("Error creating '%s': %s", $jsn_file, $!);
    }

    return $self->{_json}
Protocol-HTTP ( S/SY/SYBER/Protocol-HTTP-1.1.6.tar.gz, SYBER, 2025; MetaCPAN )
Protocol-HTTP/misc/bench.pl ( view source; MetaCPAN )
    "Connection: keep-alive\r\n".
    "\r\n"
    ;
    
my $big_request = 
        "POST /jsonrpc_example/json_service/ HTTP/1.1\r\n".
        "Host: alx3apps.appspot.com\r\n".
        "User-Agent: Mo
.
        "Content-Type: application/json-rpc;charset=UTF-8\r\n".
        "X-Requested-With: XMLHttpRequest\r\n".
        "Referer: http://alx3apps.appspot.com/jsonrpc_example/\r\n".
        "Content-
.
        "Content-Type: application/json-rpc;charset=UTF-8\r\n".
        "X-Requested-With: XMLHttpRequest\r\n".
        "Referer: http://alx3apps.appspot.com/jsonrpc_example/\r\n".
        "Content-
Exception-Backtrace ( S/SY/SYBER/Exception-Backtrace-1.1.4.tar.gz, SYBER, 2025; MetaCPAN )
Exception-Backtrace/lib/Exception/Backtrace.pod ( view source; MetaCPAN )
tring_pp($ex);

    # Programmatic API

    local Exception::Backtrace::decorator = sub { JSON::XS::encode_json(shift) };
    my $bt3 = Exception::Backtrace::get_backtrace($@);
    say $bt3->perl_trac

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