Group
Extension

Matches 5

Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/Agent.pm ( view source; MetaCPAN )
f->component );
}


has json => (
    is => 'ro',
    lazy => 1,
    builder => '_build_json',
);

method _build_json() {
    eval "use JSON::Any; 1;" or die $@;
    return JSON::Any->new;
}

1;

__EN
<Exobrain::Cache> object, with a namespace of
C<$self->component>.

=head2 json

    my $json = $self->json;

Returns a L<JSON::Any> object.

=head1 AUTHOR

Paul Fenwick <pjf@cpan.org>

=head1 COPYRIG
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/Message/Raw.pm ( view source; MetaCPAN )
se;
use JSON::Any;
use Method::Signatures;
use Carp;

use Moose::Util::TypeConstraints;

# ABSTRACT: Raw, low-level access to Exobrain packets
our $VERSION = '1.08'; # VERSION


my $json = JSON::Any->
s[0];
        my (undef, $namespace, $source) = split(/_/, $frames->[0]);
        my $metadata = $json->decode( $frames->[1] );
        return $class->$orig(
            namespace => $namespace,
     
es},
            summary   => $frames->[2],
            data      => $json->decode( $frames->[3] ),
            raw       => $json->decode( $frames->[4] ),
            nosend    => 1,
        );
    }
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/JSONify.pm ( view source; MetaCPAN )
package Exobrain::JSONify;
use Moose::Role;
use Storable qw(dclone);
use Data::Structure::Util qw(unbless);

# Basic role that allows converting self object into JSON.
# Really we should use MooseX::S


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

    return unbless dclone $self;   # Yuck!
}


1;

__END__

=pod

=head1 NAME

Exobrain::JSONify

=head1 VERSION

version 1.08

=for Pod::Coverage TO_JSON

=head1
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/Types.pm ( view source; MetaCPAN )
nings;

use JSON::Any;

# ABSTRACT: Type system for Exobrain
our $VERSION = '1.08'; # VERSION


my $json = JSON::Any->new( allow_blessed => 1 );

use MooseX::Types -declare => [qw(
    JSON
    POI
  
 HashRef
    Ref
    Str
    Num
    Int
);

subtype JSON,
    as Str,
    where { $json->decode($_) }
;

coerce JSON,
    from Ref,
    via { $json->encode($_) }
;

subtype SmsStr,
    as Str,
    wh
Exobrain ( P/PJ/PJF/Exobrain-1.08.tar.gz, PJF, 2014; MetaCPAN )
Exobrain/lib/Exobrain/Message.pm ( view source; MetaCPAN )
Constraints;
use Carp;
use ZMQ::Constants qw(ZMQ_SNDMORE);
use ZMQ;
use JSON::Any;
use Data::Dumper;

use Exobrain::Types qw(JSON);

# ABSTRACT: Top-level role for all exobrain messages
our $VERSION =
# data.

requires qw(summary);

# TODO: We should use JSON::XS, because we need specialised features
#       for handling objects.

my $json = JSON::Any->new( convert_blessed => 1 );

# We define a du
s;

    push(@frames, join("_", "EXOBRAIN", $self->namespace, $self->source));
    push(@frames, $json->encode( {
        timestamp => $self->timestamp,
        roles     => $self->roles,
        # TO

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