Group
Extension

Matches 35358

Dancer-Session-DBIC ( H/HO/HORNBURG/Dancer-Session-DBIC-0.006.tar.gz, HORNBURG, 2016; MetaCPAN )
Dancer-Session-DBIC/lib/Dancer/Session/DBIC.pm ( view source; MetaCPAN )
>. The default serialization method is L<JSON>,
though one can specify any serialization format you want. L<YAML> and L<Storable> are
viable alternatives.

JSON was chosen as the default serialization
  }

    my $session_data = $session_object->$data_column;

    # No way to check that it's valid JSON other than trying to deserialize it
    my $session = try {
        $self->_deserialize($session_
Dancer function, not from JSON.pm
    return to_json({%$self}, { pretty => 0, convert_blessed => 1 });
}


# Default Deserialize method
sub _deserialize {
    my ($self, $json) = @_;
    my $settings 
WWW-LetsEncrypt ( B/BA/BALLARD/WWW-LetsEncrypt-0.002.tar.gz, BALLARD, 2016; MetaCPAN )
WWW-LetsEncrypt/lib/WWW/LetsEncrypt/JWA.pm ( view source; MetaCPAN )
sed together with WWW::LetsEncrypt::JWK as parents
will create a JSON Web Key that implements all the functions needed for signing
JSON Web Signature objects.

=head2 Attributes

'alg' a scalar attrib
WWW-LetsEncrypt ( B/BA/BALLARD/WWW-LetsEncrypt-0.002.tar.gz, BALLARD, 2016; MetaCPAN )
WWW-LetsEncrypt/lib/WWW/LetsEncrypt/JWK.pm ( view source; MetaCPAN )

$WWW::LetsEncrypt::JWK::VERSION = '0.002';
use strict;
use warnings;

use Carp qw(confess);

use JSON;
use Moose::Role;

has 'key_type' => (
	is       => 'ro',
	isa      => 'Str',
	required => 1,
);
ed together with WWW::LetsEncrypt::JWA as parents
will create a JSON Web Key that implements all of the functions needed for
signing JSON Web Signature objects. Specifically, this role deals with stor
blic Functions

=over 4

=item generate_new

This function, when implemented, should create a new JSON Web Key of a specific algorithm type.

Input

	$number - key_length
	$string - key id

Output

	J
Net-Nessus-REST ( G/GR/GROUSSE/Net-Nessus-REST-v0.7.0.tar.gz, GROUSSE, 2016; MetaCPAN )
Net-Nessus-REST/lib/Net/Nessus/REST.pm ( view source; MetaCPAN )
package Net::Nessus::REST;

use warnings;
use strict;

use Carp;
use LWP::UserAgent;
use JSON;
use List::Util qw(first);

use version; our $VERSION = version->declare('v0.7.0');

sub new {
    my ($cl
query_form(%params);

    my $response = $self->{agent}->get($url);

    my $result = eval { from_json($response->content()) };

    if ($response->is_success()) {
        return $result;
    } else {
;

    my $response = $self->{agent}->delete($self->{url} . $path);

    my $result = eval { from_json($response->content()) };

    if ($response->is_success()) {
        return $result;
    } else {
WWW-LetsEncrypt ( B/BA/BALLARD/WWW-LetsEncrypt-0.002.tar.gz, BALLARD, 2016; MetaCPAN )
WWW-LetsEncrypt/lib/WWW/LetsEncrypt/Message.pm ( view source; MetaCPAN )
se strict;
use warnings;

use constant {RC_TOO_MANY_REQUESTS => 429};

use Carp qw(confess);

use JSON;
use LWP::UserAgent;
use Moose;
use Moose::Util::TypeConstraints;
use WWW::LetsEncrypt::JWS;
use 
lts to the
Let's Encrypt API URL, cannot be changed once the object has been created.

=item JWK

JSON Web Key object that implements both JWK and JWA (will be passed to
a JWS object). This is require
	if ($processed_response->{error} || $rate_limited) {
		my $err_ref;
		try {
			$err_ref = decode_json($Response->content());
		} catch {
			$err_ref->{message} = $Response->content();
			$err_ref->{f
WWW-LetsEncrypt ( B/BA/BALLARD/WWW-LetsEncrypt-0.002.tar.gz, BALLARD, 2016; MetaCPAN )
WWW-LetsEncrypt/lib/WWW/LetsEncrypt/Message/Authorization.pm ( view source; MetaCPAN )
(confess);

use Digest::SHA;
use HTTP::Request;
use HTTP::Status qw(RC_CREATED RC_FORBIDDEN);
use JSON;
use MIME::Base64 qw(encode_base64url);
use Moose;
use Moose::Util::TypeConstraints;

extends qw(
esponse) = @_;
	my $output_ref;
	if ($Response->code == RC_CREATED) {
		my $response_ref = decode_json($Response->content);

		if ($response_ref->{status} eq 'pending') {
			my ($challenge_ref) = grep
return {error => 1};
		}
	} elsif ($Response->code == RC_FORBIDDEN) {
		my $response_ref = decode_json($Response->content);
		if ($response_ref->{type} eq 'urn:acme:error:unauthorized') {
			if ($resp
OpenAPI ( A/AL/ALTREUS/OpenAPI-0.001.tar.gz, ALTREUS, 2016; MetaCPAN )
OpenAPI/lib/OpenAPI.pm ( view source; MetaCPAN )
ally, modulo lazy fetching of references.
That means that when a parsed schema is rendered out to JSON, it should look
the same as the original document.

Probably the sane way to do this would be to 
Catmandu-MediaWiki ( N/NJ/NJFRANCK/Catmandu-MediaWiki-0.021.tar.gz, NJFRANCK, 2016; MetaCPAN )
Catmandu-MediaWiki/lib/Catmandu/Importer/MediaWiki.pm ( view source; MetaCPAN )
   indexpageids => 1,
                    generator => $generator,
                    format => "json"
                };
                if(defined $namespace_key){
                    $a->{ $namesp
  my $a = {
                            action => "query",
                            format => "json",
                            pageids => $pageid,
                            prop => "revisions"
y, and cannot be overwritten:

action = "query"
indexpageids = 1
generator = <generate>
format = "json"

Additional parameters can be set in the constructor argument 'args'.
Arguments for a generator 
Sub-Throttler ( P/PO/POWERMAN/Sub-Throttler-v0.2.10.tar.gz, POWERMAN, 2016; MetaCPAN )
Sub-Throttler/lib/Sub/Throttler/algo.pm ( view source; MetaCPAN )
 time details needed for L</"load">).

User is supposed to serialize returned value (for ex. into JSON format),
save it into file/database, and use later with L</"load"> if she wanna
keep information 
WWW-LetsEncrypt ( B/BA/BALLARD/WWW-LetsEncrypt-0.002.tar.gz, BALLARD, 2016; MetaCPAN )
WWW-LetsEncrypt/lib/WWW/LetsEncrypt/JWK/RSA.pm ( view source; MetaCPAN )
 qw(encode_base64url decode_base64url);

use Crypt::OpenSSL::Bignum;
use Crypt::OpenSSL::RSA;
use JSON;
use Moose;

with qw(WWW::LetsEncrypt::JWK WWW::LetsEncrypt::JWA);

sub generate_new {
	my ($key_
 thumbprint {
	my ($self) = @_;

	# RFC requires the keys to be sorted lexically.
	my $JSON = JSON->new();
	$JSON->canonical(1);

	my %pubkey = $self->_get_public_key_components();
	$pubkey{kty} = 'RS
f !$hash_method;

	my $jsonified_sorted_pk   = $JSON->encode(\%pubkey);
	my $digested_jsonified_pk = $hash_method->($jsonified_sorted_pk);
	return encode_base64url($digested_jsonified_pk);
}

sub _get
Object-Anon ( R/RO/ROBN/Object-Anon-0.003.tar.gz, ROBN, 2016; MetaCPAN )
Object-Anon/lib/Object/Anon.pm ( view source; MetaCPAN )
cache
key for a Moose metaclass. That's a nice approach when you know the incoming
hash is always JSON, but doesn't work as well when you can't predict the value
type (especially if the value is a cod
WWW-ShipStation ( F/FA/FAYLAND/WWW-ShipStation-0.06.tar.gz, FAYLAND, 2016; MetaCPAN )
WWW-ShipStation/lib/WWW/ShipStation.pm ( view source; MetaCPAN )
age WWW::ShipStation;

use strict;
use 5.008_005;
our $VERSION = '0.06';

use LWP::UserAgent;
use JSON;
use Carp 'croak';
use URI::Escape qw/uri_escape/;
use HTTP::Request;

sub new {
    my $class = 
args{pass} or croak "pass is required.";

    $args{ua} ||= LWP::UserAgent->new();
    $args{json} ||= JSON->new->allow_nonref->utf8;

    $args{API_BASE} ||= 'https://ssapi.shipstation.com/';

    bl
application/json'); # JSON is better
    my $res = $self->{ua}->request($req);
    # use Data::Dumper; print STDERR Dumper(\$res);
    if ($res->header('Content-Type') =~ m{application/json}) {
      
Alien-OpenVcdiff ( F/FR/FRACTAL/Alien-OpenVcdiff-0.101.tar.gz, FRACTAL, 2016; MetaCPAN )
Alien-OpenVcdiff/lib/Alien/OpenVcdiff.pm ( view source; MetaCPAN )
vcdiff

    system(Alien::OpenVcdiff::vcdiff_binary() . " encode -dictionary file1 -target file2 -json");

=head2 Library interface

    my $openvcdiff = Alien::OpenVcdiff->new;

    my $cflags = $ope
WWW-LetsEncrypt ( B/BA/BALLARD/WWW-LetsEncrypt-0.002.tar.gz, BALLARD, 2016; MetaCPAN )
WWW-LetsEncrypt/lib/WWW/LetsEncrypt/Message/Certificate.pm ( view source; MetaCPAN )
rtificate::VERSION = '0.002';
use HTTP::Status qw(RC_OK RC_CREATED RC_ACCEPTED RC_FORBIDDEN);
use JSON;
use Moose;

extends 'WWW::LetsEncrypt::Message';

=pod

=head1 NAME

WWW::LetsEncrypt::Message::
WWW-LetsEncrypt ( B/BA/BALLARD/WWW-LetsEncrypt-0.002.tar.gz, BALLARD, 2016; MetaCPAN )
WWW-LetsEncrypt/lib/WWW/LetsEncrypt/Message/Directory.pm ( view source; MetaCPAN )
W::LetsEncrypt::Message::Directory;
$WWW::LetsEncrypt::Message::Directory::VERSION = '0.002';
use JSON;
use Moose;

extends 'WWW::LetsEncrypt::Message';

=pod

=head1 NAME

WWW::LetsEncrypt::Message::

	if ($Response->code() == 200) {
		my $json_data = decode_json($Response->content());
		return {
			successful => 1,
			finished   => 1,
			directory  => $json_data,
		};
	}
	return {
		successful =>
WWW-LetsEncrypt ( B/BA/BALLARD/WWW-LetsEncrypt-0.002.tar.gz, BALLARD, 2016; MetaCPAN )
WWW-LetsEncrypt/lib/WWW/LetsEncrypt/Message/Registration.pm ( view source; MetaCPAN )
tion;
$WWW::LetsEncrypt::Message::Registration::VERSION = '0.002';
use strict;
use warnings;

use JSON;
use HTTP::Request;
use HTTP::Status qw(RC_CREATED RC_ACCEPTED RC_FORBIDDEN RC_CONFLICT);
use Moo
REATED) {
		$self->_step('update') if $self->_step() eq 'new-reg';
		my $server_response = decode_json($Response->content);
		my $resp_ref = {%$server_response};
		$resp_ref->{successful} = 1;

		retu
l => 1,
			finished   => 1,
		};
	} elsif ($status_code == RC_FORBIDDEN) {
		my $err_ref = decode_json($Response->content);
		if ($err_ref->{type} =~ m/unauthorized$/
			&& $err_ref->{detail} =~ m/^No
Log-Defer ( F/FR/FRACTAL/Log-Defer-0.312.tar.gz, FRACTAL, 2016; MetaCPAN )
Log-Defer/lib/Log/Defer.pm ( view source; MetaCPAN )
   use Log::Defer;
    use JSON::XS; ## or whatever
    use Try::Tiny;

    sub my_logger_function {
      my $msg = shift;
      
      my $encoded_msg = try {
        JSON::XS->new->pretty(1)->encod
e($msg)
      }
      catch {
        "Failed to JSON encode msg : $_"
      };

      print $encoded_msg; ## usually you'd append this to a file
    }

    my $logger = Log::Defer->new({
            
isualisation tool L<log-defer-viz> only support JSON at this time.

The currently recommended format to store logs in is newline-separated, minified JSON. The newline+minification is useful because it
Installer ( G/GE/GETTY/Installer-0.904.tar.gz, GETTY, 2016; MetaCPAN )
Installer/lib/Installer/cpanm.pm ( view source; MetaCPAN )
~ /(?:<|!=|==)/}sub encode_json {my($self,$data)=@_;require JSON::PP;my$json=JSON::PP::encode_json($data);$json =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("%%%02x",ord($1))/eg;$json}sub version_to_query {my($
atch->{hits}{hits}};$hits[0]->{fields}}sub search_metacpan {my($self,$module,$version)=@_;require JSON::PP;$self->chat("Searching $module ($version) on metacpan ...\n");my$metacpan_uri='http://api.met
ified",query=>{constant_score=>{filter=>{and=>[{term=>{'module.authorized'=>JSON::PP::true()}},{term=>{'module.indexed'=>JSON::PP::true()}},{term=>{'module.name'=>$module }},$self->version_to_query($m
Installer ( G/GE/GETTY/Installer-0.904.tar.gz, GETTY, 2016; MetaCPAN )
Installer/lib/Installer/Software.pm ( view source; MetaCPAN )
installation
$Installer::Software::VERSION = '0.904';
use Moo;
use IO::All;
use IO::All::LWP;
use JSON_File;
use Path::Class;
use File::chdir;
use Archive::Extract;
use namespace::clean;

has target =
y => 1,
  default => sub {
    my ( $self ) = @_;
    tie(my %meta,'JSON_File',file($self->target->installer_dir,$_[0]->alias.'.json')->stringify,, pretty => 1 );
    return \%meta;
  },
);

has testa
Yeb ( G/GE/GETTY/Yeb-0.104.tar.gz, GETTY, 2016; MetaCPAN )
Yeb/lib/Yeb.pm ( view source; MetaCPAN )
ions

=head1 VERSION

version 0.104

=head1 SYNOPSIS

  package MyApp::Web;
  use Yeb qw( Session JSON );

  r "/" => sub {
    session test => pa('test');
    text "root";
  };

  r "/blub" => sub {
n '+SomeOther::YebApp';
  };

  1;

  package MyApp::Web::Test;
  use MyApp::Web;

  r "/json" => sub {
    json {
      test => session('test'),
      stash_var => st('stash_var'),
    }
  };

  r "/
ds L<plackup>

Bigger L<Text::Xslate> example:

  package MyApp::WebXslate;

  use Yeb Session => JSON => 'Xslate';

  # because of the root() usage we need to use plugin function call
  plugin Static

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