Group
Extension

Matches 6

DBIx-Class ( B/BB/BBYRD/DBIx-Class-0.08204_01.tar.gz, BBYRD, 2012; MetaCPAN )
DBIx-Class/lib/DBIx/Class/Admin.pm ( view source; MetaCPAN )
BICConnectInfo DBICHashRef/;
use MooseX::Types::JSON qw(JSON);
use MooseX::Types::Path::Class qw(Dir File);
use Try::Tiny;
use JSON::Any qw(DWIW XS JSON);
use namespace::autoclean;

=head1 NAME

DBIx:
ash ref or json string to be used for identifying data to manipulate

=cut

has 'where' => (
  is      => 'rw',
  isa     => DBICHashRef,
  coerce  => 1,
);


=head2 set

a hash ref or json string to 
> (
  is      => 'rw',
  isa     => DBICHashRef,
  coerce  => 1,
);


=head2 attrs

a hash ref or json string to be used for passing additional info to the ->search call

=cut

has 'attrs' => (
  is  
DBIx-Class ( B/BB/BBYRD/DBIx-Class-0.08204_01.tar.gz, RIBASUSHI, 2012; MetaCPAN )
DBIx-Class/lib/DBIx/Class/Storage/Debug/PrettyTrace.pm ( view source; MetaCPAN )
ttyTrace - Pretty Tracing DebugObj

=head1 SYNOPSIS

 DBIC_TRACE_PROFILE=~/dbic.json perl -Ilib ./foo.pl

Where dbic.json contains:

 {
   "profile":"console",
   "show_progress":1,
   "squash_repeats
DBIx-Class ( B/BB/BBYRD/DBIx-Class-0.08204_01.tar.gz, GETTY, 2012; MetaCPAN )
DBIx-Class/lib/DBIx/Class/Optional/Dependencies.pod ( view source; MetaCPAN )
BIx::Class administrative library

=over

=item * JSON::Any >= 1.22

=item * Moose >= 0.98

=item * MooseX::Types >= 0.21

=item * MooseX::Types::JSON >= 0.02

=item * MooseX::Types::Path::Class >= 0.
tem * Getopt::Long::Descriptive >= 0.081

=item * JSON::Any >= 1.22

=item * Moose >= 0.98

=item * MooseX::Types >= 0.21

=item * MooseX::Types::JSON >= 0.02

=item * MooseX::Types::Path::Class >= 0.
DBIx-Class ( B/BB/BBYRD/DBIx-Class-0.08204_01.tar.gz, BBYRD, 2012; MetaCPAN )
DBIx-Class/lib/DBIx/Class/Optional/Dependencies.pm ( view source; MetaCPAN )
s generated automatically by calling _gen_pod from the
# Makefile.PL in $AUTHOR mode

my $json_any = {
  'JSON::Any'                     => '1.22',
};

my $moose_basic = {
  'Moose'                   
  %$moose_basic,
};

my $admin_basic = {
  %$moose_basic,
  %$json_any,
  'MooseX::Types::Path::Class'    => '0.05',
  'MooseX::Types::JSON'           => '0.02',
  'namespace::autoclean'          => '
=> {
      'Test::EOL'                 => '1.0',
    },
  },

  test_prettydebug => {
    req => $json_any,
  },

  test_leaks => {
    req => {
      'Test::Memory::Cycle'       => '0',
      'Devel:
DBIx-Class ( B/BB/BBYRD/DBIx-Class-0.08204_01.tar.gz, BBYRD, 2012; MetaCPAN )
DBIx-Class/lib/DBIx/Class/Admin/Types.pm ( view source; MetaCPAN )
pes::JSON qw(JSON);

subtype DBICArrayRef,
    as ArrayRef;

subtype DBICHashRef,
    as HashRef;

coerce DBICArrayRef,
  from JSON,
  via { _json_to_data ($_) };

coerce DBICHashRef,
  from JSON,
  v
 _json_to_data($_) };

subtype DBICConnectInfo,
  as ArrayRef;

coerce DBICConnectInfo,
  from JSON,
   via { return _json_to_data($_) } ;

coerce DBICConnectInfo,
  from Str,
    via { return _json_t
via { [ $_ ] };

sub _json_to_data {
  my ($json_str) = @_;
  my $json = JSON::Any->new(allow_barekey => 1, allow_singlequote => 1, relaxed=>1);
  my $ret = $json->jsonToObj($json_str);
  return $ret;
DBIx-Class ( B/BB/BBYRD/DBIx-Class-0.08204_01.tar.gz, BBYRD, 2012; MetaCPAN )
DBIx-Class/lib/DBIx/Class/Manual/FAQ.pod ( view source; MetaCPAN )
m .. store JSON/YAML in a column and have it deflate/inflate automatically?

You can use L<DBIx::Class::InflateColumn> to accomplish YAML/JSON storage transparently.

If you want to use JSON, then in 
lowing:

 use JSON;

 __PACKAGE__->add_columns(qw/ ... my_column ../)
 __PACKAGE__->inflate_column('my_column', {
     inflate => sub { jsonToObj(shift) },
     deflate => sub { objToJson(shift) },
 }

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