DBIx::Skinny::Schema - Schema DSL for DBIx::Skinny
package Your::Model; use DBIx::Skinny connect_info => +{ dsn => 'dbi:SQLite:', username => '', password => '', }; 1; package Your::Model::Schema: use DBIx::Skinny::Schema; install_utf8_columns qw/name/; # for utf8 columns # set user table schema settings install_table user => schema { pk 'id'; columns qw/id name created_at/; trigger pre_insert => callback { # hook }; trigger pre_update => callback { # hook }; row_class 'Your::Model::Row::User'; }; install_inflate_rule '^name$' => callback { inflate { my $value = shift; # inflate hook }; deflate { my $value = shift; # deflate hook }; }; 1;
To install DBIx::Skinny, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Skinny
CPAN shell
perl -MCPAN -e shell install DBIx::Skinny
For more information on module installation, please visit the detailed CPAN module installation guide.