DBIx::Custom::Table - Table base class(experimental)
use DBIx::Custom::Table;
my $table = DBIx::Custom::Table->new(name => 'books');
DBIx::Custom inherits all methods from Object::Simple and implements the following new ones.
delete
$table->delete(where => \%where);
Same as delete() of DBIx::Custom except that you don't have to specify table name.
delete()
delete_all
$table->delete_all(param => $param);
Same as delete_all() of DBIx::Custom except that you don't have to specify table name.
delete_all()
helper
$table->helper(insert => sub { my $self = shift; return $self->dbi->insert(table => $self->name, @_); });
Add helper method to a DBIx::Custom::Table object.
insert
$table->insert(param => \%param);
Same as insert() of DBIx::Custom except that you don't have to specify table name.
insert()
method
$table->method( select_complex => sub { my $self = shift; return $self->dbi->select($self->name, ...); }, some_method => sub { ... } );
Define method.
new
my $table = DBIx::Custom::Table->new;
Create a DBIx::Custom::Table object.
select
$table->select(param => $param);
Same as select() of DBIx::Custom except that you don't have to specify table name.
select()
update
$table->update(param => \%param, where => \%where);
Same as update() of DBIx::Custom except that you don't have to specify table name.
update()
update_all
$table->update_all(param => \%param);
Same as update_all() of DBIx::Custom except that you don't have to specify table name.
update_all()
To install DBIx::Custom, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Custom
CPAN shell
perl -MCPAN -e shell install DBIx::Custom
For more information on module installation, please visit the detailed CPAN module installation guide.