The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Gideon::Meta::Attribute::Trait::Inflate - Inflated attribute

VERSION

version 0.0.3

SYNOPSIS

  # Store a document as JSON in the database

  package Document;
  use Gideon driver => 'DBI';
  use JSON;

  ...

  has content => (
    is => 'rw',
    traits => [ 'Gideon::DBI::Column', 'Gideon::Inflate' ],
    inflator => sub { decode_json $_[0] },
    deflator => sub { encode_json $_[0] }
  );

DESCRIPTION

It allows you to configurate an inflate and deflate methods for an attribute, Gideon will use the inflator method when retrieving the information from a data store, and the deflator before storing the information in the data store

NAME

Gideon::Meta::Attribute::Trait::Inflated - Inflated attribute

VERSION

version 0.0.3

ALIAS

Gideon::Inflate

AUTHOR

Mariano Wahlmann, Gines Razanov

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Mariano Wahlmann, Gines Razanov.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.