This is an extension to Class::DBI which injects a method into your
class to find and execute all SQL statements in the DATA section
of the package.
Combined with Class::DBI to create and dispose of tables
Lots of times, Class::DBI is used in web-based applications. (In fact, coupled
with a templating system that allows you to pass objects, such as
Template::Toolkit, Class::DBI is very much your friend for these.)
And, as we all know, one of the most irritating things about writing web-based
applications is the monotony of writing much of the same stuff over and over
again. And, where there's monotony there's a tendency to skip over stuff that
we all know is really important, but is a pain to write - like Taint Checking
and sensible input validation. (Especially as we can still show a 'working'
application without it!). So, we now have CGI::Untaint to take care of a lot of
that for us.
It so happens that CGI::Untaint also plays well with Class::DBI. All you need
to do is to 'use Class::DBI::FromCGI' in your class (or in your local
Class::DBI subclass that all your other classes inherit from. You do do that,
don't you?).
Class::DBI::LazyInflate is a utility class that allows you to create
DBI columns that only inflate to an object when it is required.
When a row is fetched, columns specified via has_lazy() is wrapped
by Data::Lazy, such that it is inflated only when the column is
actually used.
This module acts as a mix-in, adding the relationship method to
Class::DBI::Loader. Since Class::DBI::Loader knows how to map between
table names and class names, there ought to be no need to replicate
the names. In addition, it is common (but not universal) to want
reverse relationships defined for has-many relationships, and for
has-a relationships to be defined for the linkages surrounding a
many-to-many table.
Class::DBI::Loader automate the definition of Class::DBI sub-classes. scan
table schemas and setup columns, primary key.
class names are defined by table names and namespace option.
+-----------+-----------+-----------+
| table | namespace | class |
+-----------+-----------+-----------+
| foo | Data | Data::Foo |
| foo_bar | | FooBar |
+-----------+-----------+-----------+
Class::DBI::Loader supports MySQL, Postgres and SQLite.
Class::DBI::Pager is a plugin for Class::DBI, which glues Data::Page with
Class::DBI. This module reduces your work a lot, for example when you have to
do something like:
* retrieve objects from a database
* display objects with 20 items per page
In addition, your work will be reduced more, when you use Template-Toolkit as
your templating engine
This Class::DBI plugin combines the functionality from
Class::DBI::Plugin::CountSearch (counting objects without having
to use an array or an iterator), and Class::DBI::AbstractSearch,
which allows complex where-clauses a la SQL::Abstract.
The DBD::CSV module is yet another driver for the DBI (Database
independent interface for Perl). This one is based on the SQL
"engine" SQL::Statement and the abstract DBI driver DBD::File
and implements access to so-called CSV files (Comma separated
values).
This plugin provides a SQL::Abstract search method for Class::DBI. It is
similar to Class::DBI::AbstractSearch, but allows you to search and sort
by fields from joined tables.