DBE::CompatDBI - Emulate DBI with DBE
use DBE::CompatDBI qw(neat_list); $dbh = DBI->connect( "dbi:DriverName:Options" ); $sth = $dbh->prepare( "SELECT * FROM person" ); $sth->execute(); print join( ', ', @{$sth->{'NAME'}} ), "\n"; while( $row = $sth->fetchrow_arrayref() ) { print &neat_list( $row ), "\n"; }
DBE::CompatDBI is designed for switching to DBE without rewriting existing DBI scripts. You just need to replace the "use DBI" statement with "use DBE::CompatDBI". Since it uses the DBI namespace it is not possible to run the DBI module and DBE::CompatDBI at the same time.
Driver handles are not supported.
Common methods trace, trace_msg, func, parse_trace_flags, parse_trace_flag, private_attribute_info and swap_inner_handle are not supported.
Database method take_imp_data is not supported.
Statement methods bind_param_inout, bind_param_array and execute_array are not supported.
Statement attributes TYPE, PRECISION, SCALE, NULLABLE, CursorName and RowsInCache are not supported.
DBI environment variables are not supported.
Written by Christian Mueller
The DBE::CompatDBI module is free software. 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 DBE, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBE
CPAN shell
perl -MCPAN -e shell install DBE
For more information on module installation, please visit the detailed CPAN module installation guide.