Group
Extension

Matches 35358

Net-Async-WebService-lxd ( D/DR/DRRHO/Net-Async-WebService-lxd-0.03.tar.gz, DRRHO, 2022; MetaCPAN )
Net-Async-WebService-lxd/lib/Net/Async/WebService/lxd.pm ( view source; MetaCPAN )
package lxd::instance;

use strict;
use warnings;

use JSON;
use Data::Dumper;

sub state {
    my ($elf, $lxd, %params) = @_;
    my $wait = delete $params{wait} // 1;
    my $f = $lxd->instance_stat
ction {
    my ($elf, $lxd, $action, %params) = @_;
    $params{stateful}  //= JSON::false;
    $params{force}    //= JSON::false;
    $params{timeout} //= 30;
    my $wait = delete $params{wait} // 1
Data::Dumper;
$Data::Dumper::Indent = 1;

our $VERSION = '0.03';

use Encode qw(encode_utf8);
use JSON;
use HTTP::Status qw(:constants);

use Moose;


use Log::Log4perl qw(:easy);
Log::Log4perl->easy_
Dist-Mgr ( S/ST/STEVEB/Dist-Mgr-1.13.tar.gz, STEVEB, 2022; MetaCPAN )
Dist-Mgr/bin/distmgr.pod ( view source; MetaCPAN )
nfig

config - Creates an initial default configuration file.

This file will be named C<dist-mgr.json> and will be placed in your C<HOME>
directory on Unix systems, and in your C<USERPROFILE> directo
Dist-Mgr ( S/ST/STEVEB/Dist-Mgr-1.13.tar.gz, STEVEB, 2022; MetaCPAN )
Dist-Mgr/lib/Dist/Mgr/FileData.pm ( view source; MetaCPAN )
.*},
        q{*.tar.gz},
        q{_build/},
        q{blib/},
        q{Build/},
        q{META.json},
        q{META.yml},
        q{*.old},
        q{*.orig},
        q{pm_to_blib},
        q{.met
hgignore$},
        q{^_build/},
        q{^Build$},
        q{^MYMETA\.yml$},
        q{^MYMETA\.json$},
        q{^README.bak$},
        q{^Makefile$},
        q{.metadata/},
        q{.idea/},
    
AWS-XRay ( F/FU/FUJIWARA/AWS-XRay-0.12.tar.gz, FUJIWARA, 2022; MetaCPAN )
AWS-XRay/lib/AWS/XRay/Segment.pm ( view source; MetaCPAN )
;

use 5.012000;
use strict;
use warnings;

use JSON::XS    ();
use Time::HiRes ();

my $header = qq|{"format":"json","version":1}\n|;
my $json   = JSON::XS->new->utf8;

sub new {
    my $class = shif
} //= Time::HiRes::time();
    my $sock = AWS::XRay::sock() or return;
    $sock->print($header, $json->encode({%$self}));
}

sub trace_header {
    my $self = shift;
    my $h    = sprintf("Root=%s;P
Kelp-Module-WebSocket-AnyEvent ( B/BR/BRTASTIC/Kelp-Module-WebSocket-AnyEvent-1.05.tar.gz, BRTASTIC, 2022; MetaCPAN )
Kelp-Module-WebSocket-AnyEvent/lib/Kelp/Module/WebSocket/AnyEvent.pm ( view source; MetaCPAN )
:AnyEvent)],
	modules_init => {
		"WebSocket::AnyEvent" => {
			mount => '/ws',
			serializer => "json",
		},
	},


	# in application's build method

	my $ws = $self->websocket;
	$ws->add(message => s
 default, an exception will be re-thrown, and effectively the connection will be closed.

If Kelp JSON module is initialized with I<'allow_nonref'> flag then this event will never occur.

C<$error> wi
Dist-Zilla-Plugin-Acme-CPANModules ( P/PE/PERLANCAR/Dist-Zilla-Plugin-Acme-CPANModules-0.005.tar.gz, PERLANCAR, 2022; MetaCPAN )
Dist-Zilla-Plugin-Acme-CPANModules/lib/Dist/Zilla/Plugin/Acme/CPANModules.pm ( view source; MetaCPAN )
ist->{summary};
}

# dzil also wants to get abstract for main module to put in dist's
# META.{yml,json}
sub before_build {
   my $self  = shift;
   my $name  = $self->zilla->name;
   my $class = $name
Config-IOD-Reader ( P/PE/PERLANCAR/Config-IOD-Reader-0.345.tar.gz, PERLANCAR, 2022; MetaCPAN )
Config-IOD-Reader/lib/Config/IOD/Reader.pm ( view source; MetaCPAN )
       => 1,
     # allow_encodings     => undef, # or ['base64','json',...]
     # disallow_encodings  => undef, # or ['base64','json',...]
     # allow_directives    => undef, # or ['include','merge
 as verbatim. Example:

 name = !json null

With C<enable_encoding> turned off, value will not be undef but will be string
with the value of (as Perl literal) C<"!json null">.

B<NOTE: Turning this se
f violates IOD specification.>

=head2 enable_bracket => bool (default: 1)

If set to false, then JSON literal array will be parsed as verbatim. Example:

 name = [1,2,3]

With C<enable_bracket> turne
Dist-Mgr ( S/ST/STEVEB/Dist-Mgr-1.13.tar.gz, STEVEB, 2022; MetaCPAN )
Dist-Mgr/lib/Dist/Mgr.pod ( view source; MetaCPAN )
ike to
write out, or read from. Default is C<$ENV{USERPROFILE}/dist-mgr.json> on
Windows systems, and C<$ENV{HOME}/dist-mgr.json> on Unix systems.

I<Returns>: The reference to the C<%args> hash you s
of the default configuration file. this is
C<$ENV{USERPROFILE}/dist-mgr.json> on Windows systems, and
C<$ENV{HOME}/dist-mgr.json> on Unix systems.

=head2 copyright_bump

Finds and updates the copyrig
AnyEvent-Sway ( J/JO/JOHNMERTZ/AnyEvent-Sway-0.18.tar.gz, JOHNMERTZ, 2022; MetaCPAN )
AnyEvent-Sway/lib/AnyEvent/Sway.pm ( view source; MetaCPAN )
package AnyEvent::Sway;
# vim:ts=4:sw=4:expandtab

use strict;
use warnings;
use JSON::XS;
use AnyEvent::Handle;
use AnyEvent::Socket;
use AnyEvent;
use Encode;
use Scalar::Util qw(tainted);
use Carp;
defined($self->{callbacks}->{$type});

    my $cb = $self->{callbacks}->{$type};
    $cb->(decode_json $payload);

    return if ($type & $event_mask) == $event_mask;

    # If this was a one-time cal
tets
            $payload = encode_utf8($content);
        } else {
            $payload = encode_json $content;
        }
    }
    my $message = $magic . pack("LL", length($payload), $type) . $paylo
Config-IOD-Reader ( P/PE/PERLANCAR/Config-IOD-Reader-0.345.tar.gz, PERLANCAR, 2022; MetaCPAN )
Config-IOD-Reader/lib/Test/Config/IOD/Common.pm ( view source; MetaCPAN )
nput => <<'_',
name=!json "1\n2"
_
            dies => 1,
        );
        test_read_iod(
            args  => {allow_encodings=>['json']},
            input => <<'_',
name=!json "1\n2"
name2=!j "3\
allow_encodings=>['json']},
            input => <<'_',
name=!json "1\n2"
_
            dies => 1,
        );
        test_read_iod(
            args  => {disallow_encodings=>['json']},
            in
t_read_iod(
            args  => {disallow_encodings=>['hex']},
            input => <<'_',
name=!json "1\n2"
_
            result => {GLOBAL=>{name=>"1\n2"}},
        );
    };

    subtest "opt: all
Dist-Mgr ( S/ST/STEVEB/Dist-Mgr-1.13.tar.gz, STEVEB, 2022; MetaCPAN )
Dist-Mgr/lib/Dist/Mgr.pm ( view source; MetaCPAN )
e::Copy::Recursive qw(rmove_glob);
use File::Path qw(make_path rmtree);
use File::Find::Rule;
use JSON;
use Module::Starter;
use PPI;
use Term::ReadKey;
use Tie::File;

use Exporter qw(import);
our @I
export_private(),
);

our $VERSION = '1.13';

use constant {
    CONFIG_FILE         => 'dist-mgr.json',
    GITHUB_CI_FILE      => 'github_ci_default.yml',
    GITHUB_CI_PATH      => '.github/workflo
h, '<', $file or croak "Can't open config file $file: $!";
            my $json = <$fh>;
            $conf = decode_json $json;

            for (keys %{ $conf }) {
                delete $conf->{$_} 
Config-IOD-Reader ( P/PE/PERLANCAR/Config-IOD-Reader-0.345.tar.gz, PERLANCAR, 2022; MetaCPAN )
Config-IOD-Reader/lib/Config/IOD/Base.pm ( view source; MetaCPAN )
  $4, # COL_V_COMMENT
        ] if $needs_res;

        # canonicalize shorthands
        $enc = "json" if $enc eq 'j';
        $enc = "hex"  if $enc eq 'h';
        $enc = "expr" if $enc eq 'e';

   
             if grep {$_ eq $enc} @{$self->{disallow_encodings}};
        }

        if ($enc eq 'json') {

            # XXX imperfect regex for simplicity, comment should not contain
            # "
)(.*) )?
                     \z/x or return ("Invalid syntax in JSON-encoded value");
            my $decode_res = $self->_decode_json($val);
            return ($decode_res->[1]) unless $decode_res-
Config-IOD ( P/PE/PERLANCAR/Config-IOD-0.353.tar.gz, PERLANCAR, 2022; MetaCPAN )
Config-IOD/lib/Config/IOD.pm ( view source; MetaCPAN )
       => 1,
     # allow_encodings     => undef, # or ['base64','json',...]
     # disallow_encodings  => undef, # or ['base64','json',...]
     # allow_directives    => undef, # or ['include','merge
 as verbatim. Example:

 name = !json null

With C<enable_encoding> turned off, value will not be undef but will be string
with the value of (as Perl literal) C<"!json null">.

B<NOTE: Turning this se
f violates IOD specification.>

=head2 enable_bracket => bool (default: 1)

If set to false, then JSON literal array will be parsed as verbatim. Example:

 name = [1,2,3]

With C<enable_bracket> turne
JSON-Server ( B/BK/BKB/JSON-Server-0.03.tar.gz, BKB, 2022; MetaCPAN )
JSON-Server/lib/JSON/Server.pod ( view source; MetaCPAN )



=encoding UTF-8

=head1 NAME

JSON::Server - JSON-only server

=head1 SYNOPSIS

    
    use JSON::Server;
    my $js = JSON::Server->new (handler => \& hello, port => '7777', data => 'OK');
    wh
    }
    

(This example is included as L<F<synopsis.pl>|https://fastapi.metacpan.org/source/BKB/JSON-Server-0.03/examples/synopsis.pl> in the distribution.)


Then test your server:

    $ perl exam
 }
    {"JSON::Server::control":"close"}
    {
            "JSON::Server::response":"closing"
    }
    Connection closed by foreign host.


=head1 VERSION

This documents version 0.03 of JSON-Server
Carton ( M/MI/MIYAGAWA/Carton-v1.0.35.tar.gz, MIYAGAWA, 2022; MetaCPAN )
Carton/lib/Carton/Packer.pm ( view source; MetaCPAN )
 my($self, $dist) = @_;

    my @meta;
    my $finder = sub {
        if (m!\b$dist-.*[\\/]MYMETA.json!) {
            my $meta = CPAN::Meta->load_file($_);
            push @meta, $meta if $meta->nam
JSON-Server ( B/BK/BKB/JSON-Server-0.03.tar.gz, BKB, 2022; MetaCPAN )
JSON-Server/script/echo.pl ( view source; MetaCPAN )
tware/install/bin/perl
use warnings;
use strict;
use utf8;
use FindBin '$Bin';
use lib "$Bin/../lib";
use JSON::Server;
my $server = JSON::Server->new (port => 3737, verbose => 1);
$server->serve ();
Carton ( M/MI/MIYAGAWA/Carton-v1.0.35.tar.gz, MIYAGAWA, 2022; MetaCPAN )
Carton/lib/Carton/Snapshot.pm ( view source; MetaCPAN )
talls;
    my $wanted = sub {
        if ($_ eq 'install.json') {
            push @installs, [ $File::Find::name, "$File::Find::dir/MYMETA.json" ];
        }
    };
    File::Find::find($wanted, $lib
eturn 1;
        }
    };

    for my $file (@installs) {
        my $module = Carton::Util::load_json($file->[0]);
        my $prereqs = -f $file->[1] ? CPAN::Meta->load_file($file->[1])->effective_p
Carton ( M/MI/MIYAGAWA/Carton-v1.0.35.tar.gz, MIYAGAWA, 2022; MetaCPAN )
Carton/lib/Carton/Util.pm ( view source; MetaCPAN )
;
use strict;
use warnings;

sub load_json {
    my $file = shift;

    open my $fh, "<", $file or die "$file: $!";
    from_json(join '', <$fh>);
}

sub dump_json {
    my($data, $file) = @_;

    op
h;
    print $fh to_json($data);
}

sub from_json {
    require JSON::PP;
    JSON::PP->new->utf8->decode($_[0])
}

sub to_json {
    my($data) = @_;
    require JSON::PP;
    JSON::PP->new->utf8->pre
Carton ( M/MI/MIYAGAWA/Carton-v1.0.35.tar.gz, MIYAGAWA, 2022; MetaCPAN )
Carton/lib/Carton/Doc/Check.pod ( view source; MetaCPAN )
heck> will warn you about this:

  $ carton check
  Following dependencies are not satisfied.
    JSON has version 2.51. Needs 2.52
  Run `carton install` to install them.

You can run C<carton instal
JSON-Server ( B/BK/BKB/JSON-Server-0.03.tar.gz, BKB, 2022; MetaCPAN )
JSON-Server/lib/JSON/Client.pod ( view source; MetaCPAN )



=encoding UTF-8

=head1 NAME

JSON::Client - Example client for JSON::Server

=head1 VERSION

This documents version 0.03 of JSON::Client
corresponding to L<git commit ad3eb95dc23ace0b097b7e253b1c4
enkasminbullock/json-server/commit/ad3eb95dc23ace0b097b7e253b1c4047a2c243bd> released on Sat Apr 30 14:09:31 2022 +0900.

=head1 DESCRIPTION

This is an example client module for L<JSON::Server> which
a JSON::Server server.

=head1 SYNOPSIS

    my $client = JSON::Client->new (
        port => '5555', # This is the port of the server we are using
    );

=head1 METHODS

=head2 new

Make a new JSON 

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