Group
Extension

Matches 3

OpusVL-SysParams ( A/AL/ALTREUS/OpusVL-SysParams-0.20.tar.gz, ALTREUS, 2017; MetaCPAN )
OpusVL-SysParams/lib/OpusVL/SysParams.pm ( view source; MetaCPAN )
package OpusVL::SysParams;

use warnings;
use strict;
use JSON;
use Data::Munge qw/elem/;

use Moose;

has 'schema' => (isa => 'DBIx::Class::Schema', is => 'ro', required => 1,
    default => sub
    
ltset('SysInfo')->set(@_);
}


sub set_json {
    my $self = shift;
    my $name = shift;
    my $val = shift;
    my $schema = $self->schema;
    my $obj = JSON->new->allow_nonref->decode($val);
    
ame, $obj);
}


sub get_json {
    my $self = shift;
    my $schema = $self->schema;

    my $val = $schema->resultset('SysInfo')->get(@_);
    return if !$val;
    return JSON->new->allow_nonref->enc
OpusVL-SysParams ( A/AL/ALTREUS/OpusVL-SysParams-0.20.tar.gz, ALTREUS, 2017; MetaCPAN )
OpusVL-SysParams/lib/OpusVL/SysParams/Schema/Result/SysInfo.pm ( view source; MetaCPAN )
sInfo;

use strict;
use warnings;

use Moose;
use MooseX::NonMoose;
use namespace::autoclean;
use JSON;
use Data::Munge qw/elem/;
use Scalar::Util qw/reftype looks_like_number/;
extends 'DBIx::Class::
ame");

sub decoded_value
{
    my $self = shift;
    return if not defined $self->value;
	return JSON->new->allow_nonref->decode($self->value);
}

sub viable_type_conversions {
    my $self = shift;
f->decoded_value;

    if (ref $value) {
        if (ref $value =~ /Bool/) {
            # JSON::Boolean, JSON::PP::Boolean, etc
            $self->data_type('bool')
        }
        elsif (reftype $
OpusVL-SysParams ( A/AL/ALTREUS/OpusVL-SysParams-0.20.tar.gz, ALTREUS, 2017; MetaCPAN )
OpusVL-SysParams/lib/OpusVL/SysParams/Schema/ResultSet/SysInfo.pm ( view source; MetaCPAN )
 OpusVL::SysParams::Schema::ResultSet::SysInfo;

use Moose;
extends 'DBIx::Class::ResultSet';
use JSON;


sub ordered
{
    my $self = shift;
    my $me = $self->current_source_alias;
    return $self

	my $info = $self->find_or_new({
        name  => $name,
    });

    $info->set_column(value => JSON->new->allow_nonref->encode($value));
    if ($data_type) {
        $info->set_column(data_type =>
lf = shift;
	my $name = shift;

	my $info = $self->find
	({
		name => $name
	});

	return $info ? JSON->new->allow_nonref->decode($info->value) : undef;
}

sub del 
{
	my $self = shift;
	my $name = sh

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