Plibwrap - module which wraps DBD::Plibdata to emulate Plibdata
use strict; use Plibwrap; my $db1 = Plibwrap->connect("dbi:Informix:cars", $USERNAME, $PASSWORD, {PrintError => 0}); my $dbh = Plibwrap->connect("dbi:Plibdata:host=$HOSTNAME;port=$PORT", $USERNAME, $PASSWORD, {PrintError => 0}); my ($status,$err); my $sql = 'SELECT tabname, tabid FROM systables'; if (($status = $dbh->SQLExecSQL($sql)) < 0) { $err = $dbh->GetError(); die "$err\n"; } else { while ( ($status = $dbh->SQLFetch()) == $Plibdata::RET_OK) { $tabname = $dbh->{Row}->GetCharValue('tabname'); $tabid = $dbh->{Row}->GetCharValue('tabid'); print "ID: $tabid\t\tName: $tabname\n"; } } $sql = "SELECT fullname FROM id_rec WHERE id = 1"; my ($name) = $dbh->selectrow_array($sql);
A lot of code, Jenzabar and local, relies on Plibdata's interface -- especially the Row object. The goal of Plibwrap is to emulate the most used client functionality in Plibdata.
As Plibwrap wraps DBD::Plibdata, you can use the database handle like any other DBI handle.
. Server functionality . Anything not used in the standard CX code
Stephen Olander-Waters < stephenw AT stedwards.edu >
Copyright (c) 2005-2007 by Stephen Olander-Waters, all rights reserved.
You may freely distribute and/or modify this module under the terms of either the GNU General Public License (GPL) or the Artistic License, as specified in the Perl README file.
No Jenzabar code or intellectual property was used or misappropriated in the making of this module.
DBD::Plibdata, DBI, DBD::Informix
To install DBD::Plibdata, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBD::Plibdata
CPAN shell
perl -MCPAN -e shell install DBD::Plibdata
For more information on module installation, please visit the detailed CPAN module installation guide.