DBD::Template - A template/sample class for DBI drivers.
This is still alpha version.
use DBI; $hDb = DBI->connect("DBI:Template:", '', '', {AutoCommit => 1, RaiseError=> 1, tmpl_func_ => { connect => \&connect, prepare => \&prepare, execute => \&execute, fetch => \&fetch, rows => \&rows, name => \&name, table_info => \&table_info, }, tmpl_your_var => 'what you want', #... ) or die "Cannot connect: " . $DBI::errstr; $hSt = $hDb->prepare("CREATE TABLE a (id INTEGER, name CHAR(10))") or die "Cannot prepare: " . $hDb->errstr(); ... $hDb->disconnect();
The DBD::Template module is a DBI driver. You can make DBD with simply define function described below;
You can/should defined these functions to make DBD. required means "You should define that function". Please refer example/tmpl*.pl, for more detail.
Kawai Takanori (Hippo2000) kwitknr@cpan.org
DBI, DBI::DBD
Copyright (c) 2002 KAWAI,Takanori All rights reserved.
You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.
To install DBD::Template, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBD::Template
CPAN shell
perl -MCPAN -e shell install DBD::Template
For more information on module installation, please visit the detailed CPAN module installation guide.