DustyDB::Meta::Attribute - Moose meta-class for DustyDB::Record attributes
version 0.06
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.
class_name
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.
To install DustyDB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DustyDB
CPAN shell
perl -MCPAN -e shell install DustyDB
For more information on module installation, please visit the detailed CPAN module installation guide.