Group
Extension

Matches 4

Bot-Cobalt ( A/AV/AVENJ/Bot-Cobalt-0.021003.tar.gz, AVENJ, 2016; MetaCPAN )
Bot-Cobalt/lib/Bot/Cobalt/DB.pm ( view source; MetaCPAN )
 => 'rw',
  isa       => Object,
  builder   => sub {
    Bot::Cobalt::Serializer->new(Format => 'JSON')
  },
);
{ no warnings 'once'; *Serializer = *serializer; }

## _orig is the original tie().
has
e_key(
    sub { $_ .= "\0" }
  );

  ## JSONified values
  $self->DB->filter_fetch_value(
    sub {
      s/\0$//;
      $_ = $self->serializer->ref_from_json($_)
        unless $self->raw;
    }
  )
;
  $self->DB->filter_store_value(
    sub {
      $_ = $self->serializer->json_from_ref($_)
        unless $self->raw;
      $_ .= "\0";
    }
  );

  1
}

sub dbclose {
  my ($self) = @_;

  unless 
Bot-Cobalt ( A/AV/AVENJ/Bot-Cobalt-0.021003.tar.gz, AVENJ, 2016; MetaCPAN )
Bot-Cobalt/lib/Bot/Cobalt/Plugin/Extras/CPAN.pm ( view source; MetaCPAN )
ot::Cobalt::Common;

use Bot::Cobalt::Serializer;
our $Serializer = Bot::Cobalt::Serializer->new('JSON');

use HTTP::Request;

use Module::CoreList;

use Try::Tiny;

our $HelpText
  = 'try: dist, late
 info for $dist ($status)"
      );
    }
    return PLUGIN_EAT_ALL
  }

  my $json = $response->content;
  unless ($json) {
    broadcast('message',
      $hints->{Context}, $hints->{Channel},
      
ed for $dist",
    );
    return PLUGIN_EAT_ALL
  }

  my $d_hash = 
    try { $Serializer->thaw($json) } 
    catch {
      broadcast( 'message',
        $hints->{Context}, $hints->{Channel},
       
Bot-Cobalt ( A/AV/AVENJ/Bot-Cobalt-0.021003.tar.gz, AVENJ, 2016; MetaCPAN )
Bot-Cobalt/lib/Bot/Cobalt/Manual/Plugins.pod ( view source; MetaCPAN )
serialize arbitrary data structures to some 
standardized format. Serialization formats such as B<JSON> and B<YAML> 
are convenient for "speaking" to other networked applications, sharing 
data, or sa
  ## create a JSON serializer:
  my $jsify = Bot::Cobalt::Serializer->new( Format => 'JSON' );

  ## serialize a perl hash:
  my $ref = { Some => { Deep => [ 'Structure' ] } };
  my $json = $jsify->fr
Bot-Cobalt ( A/AV/AVENJ/Bot-Cobalt-0.021003.tar.gz, AVENJ, 2016; MetaCPAN )
Bot-Cobalt/lib/Bot/Cobalt/Serializer.pm ( view source; MetaCPAN )

use Carp;
use Scalar::Util 'reftype';

## These two must be present anyway:
use YAML::XS ();
use JSON::MaybeXS ();

use Fcntl ':flock';
use Time::HiRes  'sleep';
use Scalar::Util 'blessed';

use Bot:

  builder   => sub {
    +{
      YAML   => 'YAML::Syck',
      YAMLXS => 'YAML::XS',
      JSON   => 'JSON::MaybeXS',
    }
  },
);

has yamlxs_from_ref => (
  is        => 'rw',
  lazy      => 1,
 
ire YAML::Syck; YAML::Syck::Load($_[0]) },
);

has json_from_ref => (
  is        => 'rw',
  lazy      => 1,
  coerce    => sub {
    my $jsify = JSON::MaybeXS->new(
      utf8 => 1, allow_nonref => 1

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