DustyDB::Meta::Attribute - Moose meta-class for DustyDB::Record attributes
For any model class (one that uses DustyDB::Object and does DustyDB::Record), all the attributes will be given this Moose meta-class role. These attributes are used to help with encoding and decoding types that might not be easily stored directly within DBM::Deep.
This is a subroutine used to transform a Perl object into a something else you want to store. Since we use DBM::Deep to store the objects, this can be much more flexible than just a scalar.
Be careful, though, not to store a hash with a
class_name key or very bad things might happen.
This subroutine should expect the decoded value in
$_ and return whatever value should be stored.
This is a subroutine used to transform the previously encoded and stored "thing" into the object that is stored in the column.
This subroutine should expect the encoded value in
$_ and return whatever value should be loaded into the model attribute.
This is a helper method to make sure that encoding is performed properly.
This is a helper method to make sure that decoding is performed properly.