MAN page from RedHat Other mysql-perl-bin-3.21.23-2libc.i386.rpm
DBI
Section: User Contributed Perl Documentation (3)
Updated: perl 5.004, patch 04
Index NAME
DBI - Database independent interface for Perl
SYNOPSIS
use DBI; @data_sources = DBI->data_sources($driver_name);
$dbh = DBI->connect($data_source, $username, $auth); $dbh = DBI->connect($data_source, $username, $auth, \%attr); $rc = $dbh->disconnect; $rv = $dbh->do($statement); $rv = $dbh->do($statement, \%attr); $rv = $dbh->do($statement, \%attr, @bind_values); $sth = $dbh->prepare($statement); $sth = $dbh->prepare($statement, \%attr); $rc = $sth->bind_col($col_num, \$col_variable); $rc = $sth->bind_columns(\%attr, @list_of_refs_to_vars_to_bind);
$rv = $sth->bind_param($param_num, $bind_value); $rv = $sth->bind_param($param_num, $bind_value, $bind_type); $rv = $sth->bind_param($param_num, $bind_value, \%attr);
$rv = $sth->execute; $rv = $sth->execute(@bind_values); @row_ary = $sth->fetchrow_array; $ary_ref = $sth->fetchrow_arrayref; $hash_ref = $sth->fetchrow_hashref; $rc = $sth->finish; $rv = $sth->rows; $rc = $dbh->commit; $rc = $dbh->rollback;
$sql = $dbh->quote($string); $rc = $h->err; $str = $h->errstr; $rv = $h->state;
NOTE
This is the draft DBI specification that corresponds to the DBI version 0.91($Date: 1997/12/10 16:50:14 $).
The DBI specification is currently evolving quite quickly so it isimportant to check that you have the latest copy. The RECENT CHANGESsection below has a summary of user-visible changes and the Changesfile supplied with the DBI holds more detailed change information.
Note also that whenever the DBI changes the drivers take some time tocatch up. Recent versions of the DBI have added many new features thatmay not yet be supported by the drivers you use. Talk to the authors ofthose drivers if you need the features.
Please also read the DBI FAQ which is installed as a DBI::FAQ module soyou can use perldoc to read it by executing the perldoc DBI::FAQ command.
RECENT CHANGES
A brief summary of significant user-visible changes in recent versions(if a recent version isn't mentioned it simply means that there were nosignificant user-visible changes in that version).
- DBI 0.91 - 10th December 1997
- Fixed bug in New-style DBI->connect call which was not defaultingAutoCommit and PrintError to on.
- DBI 0.86 - 16th July 1997
- Added $h->{LongReadLen} and $h->{LongTruncOk} attributes for LONGs/BLOBs.Added DBI_USER and DBI_PASS env vars. See the connect entry elsewhere in this document for usage.Added DBI->trace() to set global trace level (like per-handle $h->trace).PERL_DBI_DEBUG env var renamed DBI_TRACE (old name still works for now).Updated docs, including commit, rollback, AutoCommit and Transactions sections.Added bind_param method and execute(@bind_values) to docs.
- DBI 0.85 - 25th June 1997
- The `new-style connect' (see below) now defaults to AutoCommit mode unless{ AutoCommit => 0 } specified in connect attributes (see the connect entry elsewhere in this document ).New DBI_DSN env var default for connect method (supersedes DBI_DRIVER).
- DBI 0.84 - 20th June 1997
- Added $h->{PrintError} attribute which, if set true, causes all errorsto trigger a warn(). New-style DBI->connect call now automaticallysets PrintError=1 unless { PrintError => 0 } specified in the connectattributes (see the connect entry elsewhere in this document ). The old-style connect with a separatedriver parameter is deprecated. Renamed $h->debug to $h->trace() andadded a trace filename arg.
- DBI 0.83 - 11th June 1997
- Added `new-style' driver specification syntax to the DBI->connectdata_source parameter: DBI->connect( `dbi:driver:...', $user, $passwd);The DBI->data_sources method should return data_source names with theappropriate `dbi:driver:' prefix. DBI->connect will warn if \%attr istrue but not a hash ref. Added new fetchrow methods (fetchrow_array,fetchrow_arrayref and fetchrow_hashref): Added the DBI FAQ fromAlligator Descartes in module form for easy reading via ``perldoc DBI::FAQ''.
DESCRIPTION
The Perl DBI is a database access Application Programming Interface(API) for the Perl Language. The DBI defines a set of functions,variables and conventions that provide a consistent database interfaceindependant of the actual database being used.
It is important to remember that the DBI is just an interface. A thinlayer of `glue' between an application and one or more Database Drivers.It is the drivers which do the real work. The DBI provides a standardinterface and framework for the drivers to operate within.
This document is a work-in-progress. Although it is incomplete itshould be useful in getting started with the DBI.
Architecture of a DBI Application
|<- Scope of DBI ->| .-. .--------------. .-------------. .-------. | |---| XYZ Driver |---| XYZ Engine | | Perl | |S| `--------------' `-------------' | script| |A| |w| .--------------. .-------------. | using |--|P|--|i|---|Oracle Driver |---|Oracle Engine| | DBI | |I| |t| `--------------' `-------------' | API | |c|... |methods| |h|... Other drivers `-------' | |... `-'
The
API is the Application Perl-script (or Programming) Interface. Thecall interface and variables provided by
DBI to perl scripts. The
APIis implemented by the
DBI Perl extension.
The `Switch' is the code that `dispatches' the DBI method calls to theappropriate Driver for actual execution. The Switch is alsoresponsible for the dynamic loading of Drivers, error checking/handlingand other duties. The DBI and Switch are generally synonymous.
The Drivers implement support for a given type of Engine (database).Drivers contain implementations of the DBI methods written using theprivate interface functions of the corresponding Engine. Only authorsof sophisticated/multi-database applications or generic libraryfunctions need be concerned with Drivers.
Notation and Conventions
DBI static 'top-level' class name $dbh Database handle object $sth Statement handle object $drh Driver handle object (rarely seen or used in applications) $h Any of the $??h handle types above $rc General Return Code (boolean: true=ok, false=error) $rv General Return Value (typically an integer) @ary List of values returned from the database, typically a row of data $rows Number of rows processed by a function (if available, else -1) $fh A filehandle undef NULL values are represented by undefined values in perl
Note that Perl will automatically destroy database and statement objectsif all references to them are deleted.
Handle object attributes are shown as:
$h->{attribute_name} (type)
where type indicates the type of the value of the attribute (if it'snot a simple scalar):
\$ reference to a scalar: $h->{attr} or $a = ${$h->{attr}} \@ reference to a list: $h->{attr}->[0] or @a = @{$h->{attr}} \% reference to a hash: $h->{attr}->{a} or %a = %{$h->{attr}}General Interface Rules & Caveats
The DBI does not have a concept of a `current session'. Every sessionhas a handle object (i.e., a $dbh) returned from the connect method andthat handle object is used to invoke database related methods.
Most data is returned to the perl script as strings (null values arereturned as undef). This allows arbitrary precision numeric data to behandled without loss of accuracy. Be aware that perl may not preservethe same accuracy when the string is used as a number.
Dates and times are returned as character strings in the native formatof the corresponding Engine. Time Zone effects are Engine/Driverdependent.
Perl supports binary data in perl strings and the DBI will pass binarydata to and from the Driver without change. It is up to the Driverimplementors to decide how they wish to handle such binary data.
Multiple SQL statements may not be combined in a single statementhandle, e.g., a single $sth.
Non-sequential record reads are not supported in this version of theDBI. E.g., records can only be fetched in the order that the databasereturned them and once fetched they are forgotten.
Positioned updates and deletes are not directly supported by the DBI.See the description of the CursorName attribute for an alternative.
Individual Driver implementors are free to provide any privatefunctions and/or handle attributes that they feel are useful.Private driver functions can be invoked using the DBI func method.Private driver attributes are accessed just like standard attributes.
Character sets: Most databases which understand character sets have adefault global charset and text stored in the database is, or shouldbe, stored in that charset (if it's not then that's the fault of eitherthe database or the application that inserted the data). When text isfetched it should be (automatically) converted to the charset of theclient (presumably based on the locale). If a driver needs to set aflag to get that behaviour then it should do so. It should not requirethe application to do that.
Naming Conventions
The DBI package and all packages below it (DBI::*) are reserved foruse by the DBI. Package names beginning with DBD:: are reserved for useby DBI database drivers. All environment variables used by the DBIor DBD's begin with `DBI_' or `DBD_'.
The letter case used for attribute names is significant and plays animportant part in the portability of DBI scripts. The case of theattribute name is used to signify who defined the meaning of that nameand its values.
Case of name Has a meaning defined by ------------ ------------------------ UPPER_CASE Standards, e.g., X/Open, SQL92 etc (portable) MixedCase DBI API (portable), underscores are not used. lower_case Driver or Engine specific (non-portable)
It is of the utmost importance that Driver developers only uselowercase attribute names when defining private attributes. Privateattribute names must be prefixed with the driver name or suitableabbreviation (e.g., ora_type, solid_charset etc).
Data Query Methods
The DBI allows an application to `prepare' a statement for later execution.A prepared statement is identified by a statement handle object, e.g., $sth.
Typical method call sequence for a select statement:
connect, prepare, execute, fetch, fetch, ... finish, execute, fetch, fetch, ... finish, execute, fetch, fetch, ... finish.
Typical method call sequence for a non-select statement:
connect, prepare, execute, execute, execute.
Placeholders and Bind Values
Some drivers support Placeholders and Bind Values. These drivers allowa database statement to contain placeholders, sometimes calledparameter markers, that indicate values that will be supplied later,before the prepared statement is executed. For example, an applicationmight use the following to insert a row of data into the SALES table:
insert into sales (product_code, qty, price) values (?, ?, ?)
or the following, to select the description for a product:
select product_description from products where product_code = ?
The
? characters are the placeholders. The association of actualvalues with placeholders is known as binding and the values arereferred to as bind values. Undefined values or
undef can be usedto indicate null values.
Without using placeholders, the insert statement above would have tocontain the literal values to be inserted and it would have to bere-prepared and re-executed for each row. With placeholders, the insertstatement only needs to be prepared once. The bind values for each rowcan be given to the execute method each time it's called. By avoidingthe need to re-prepare the statement for each row the applicationtypically many times faster! Here's an example:
my $sth = $dbh->prepare(q{ insert into sales (product_code, qty, price) values (?, ?, ?) }) || die $dbh->errstr; while(<>) { chop; my($product_code, $qty, $price) = split(/,/); $sth->execute($product_code, $qty, $price) || die $dbh->errstr; } $dbh->commit || die $dbh->errstr;See the
execute and
bind_param entries elsewhere in this document for more details.
See the bind_column entry elsewhere in this document for a related method used to associate perlvariables with the output columns of a select statement.
SQL - A Query Language
Most DBI drivers require applications to use a dialect of SQL (theStructured Query Language) to interact with the database engine. Theselinks may provide some useful information about SQL:
http://www.jcc.com/sql_stnd.html http://w3.one.net/~jhoffman/sqltut.htm http://skpc10.rdg.ac.uk/misc/sqltut.htm http://epoch.CS.Berkeley.EDU:8000/sequoia/dba/montage/FAQ/SQL_TOC.html http://www.bf.rmit.edu.au/Oracle/sql.html
The
DBI itself does not mandate or require any particular language tobe used. It is language independant. In
ODBC terms it is always inpass-thru mode. The only requirement is that queries and otherstatements must be expressed as a single string of letters passedas the first argument to the the
prepare entry elsewhere in this document method.
THE DBI CLASS
DBI Class Methods
- connect
$dbh = DBI->connect($data_source, $username, $password); $dbh = DBI->connect($data_source, $username, $password, \%attr);
Establishes a database connection (session) to the requested data_source.Returns a database handle object.Multiple simultaneous connections to multiple databases through multipledrivers can be made via the DBI. Simply make one connect call for eachand keep a copy of each returned database handle.
The $data_source value should begin with `dbi:driver_name:'. Thatprefix will be stripped off and the driver_name part is used to specifythe driver (letter case is significant). As a convenience, if the$data_source field is undefined or empty the DBI will substitute thevalue of the environment variable DBI_DSN if any.
If driver is not specified, the environment variable DBI_DRIVER isused. If that variable is not set then the connect dies.
Examples of $data_source values:
dbi:DriverName:database_name dbi:DriverName:database_nameAATThostname dbi:DriverName:database_name~hostname!port dbi:DriverName:database=database_name;host=hostname;port=port
There is no standard for the text following the driver name. Eachdriver is free to use whatever syntax it wants. The only requirement theDBI makes is that all the information is supplied in a single string.See the documentation for the drivers you are using for a descriptionof the syntax it uses. Where a driver needs to define it's own syntaxfor the data_source it is recommended that they follow the ODBC style(the last example above).If $username or $password are undefined (rather than empty) then theDBI will substitute the values of the DBI_USER and DBI_PASS environmentvariables respectively. The use of the environment for these values isnot recommended for security reasons. The mechanism is only intended tosimplify testing.
DBI->connect automatically installs the driver if it has not beeninstalled yet. Driver installation always returns a valid driverhandle or it dies with an error message which includes the string'install_driver' and the underlying problem. So, DBI->connect will dieon a driver installation failure and will only return undef on aconnect failure, for which $DBI::errstr will hold the error.
The $data_source argument (with the `dbi:...:' prefix removed) and the$username and $password arguments are then passed to the driver forprocessing. The DBI does not define any interpretation for thecontents of these fields. The driver is free to interpret thedata_source, username and password fields in any way and supplywhatever defaults are appropriate for the engine being accessed(Oracle, for example, uses the ORACLE_SID and TWO_TASK env vars if nodata_source is specified).
The AutoCommit and PrintError attributes for each connection default todefault to on (see the AutoCommit and PrintError entries elsewhere in this document for more information).
The \%attr parameter can be used to alter the default settings of thePrintError, RaiseError and AutoCommit attributes. For example:
$dbh = DBI->connect($data_source, $user, $pass, { PrintError => 0, AutoCommit => 0 });These are currently the only defined uses for the DBI->connect \%attr.Portable applications should not assume that a single driver will beable to support multiple simultaneous sessions.
Where possible each session ($dbh) is independent from the transactionsin other sessions. This is useful where you need to hold cursors openacross transactions, e.g., use one session for your long lifespancursors (typically read-only) and another for your short updatetransactions.
For compatibility with old DBI scripts the driver can be specified bypassing its name as the fourth argument to connect (instead of \%attr):
$dbh = DBI->connect($data_source, $user, $pass, $driver);
In this `old-style' form of connect the $data_source should not startwith `dbi:driver_name:' and, even if it does, the embedded driver_namewill be ignored. The $dbh->{AutoCommit} attribute is undefined. The$dbh->{PrintError} attribute is off. And the old DBI_DBNAME env var ischecked if DBI_DSN is not defined.
- available_drivers
@ary = DBI->available_drivers; @ary = DBI->available_drivers($quiet);
Returns a list of all available drivers by searching for DBD::* modulesthrough the directories in @INC. By default a warning will be given ifsome drivers are hidden by others of the same name in earlierdirectories. Passing a true value for $quiet will inhibit the warning.
- data_sources
@ary = DBI->data_sources($driver);
Returns a list of all data sources (databases) available via the nameddriver. The driver will be loaded if not already. If $driver is emptyor undef then the value of the DBI_DRIVER environment variable will beused.Note that many drivers have no way of knowing what data sources mightbe available for it and thus, typically, return an empty list.
- trace
DBI->trace($trace_level) DBI->trace($trace_level, $trace_file)
DBI trace information can be enabled for all handles using this DBIclass method. To enable trace information for a specific handle usethe similar $h->trace method described elsewhere.Use $trace_level 2 to see detailed call trace information includingparameters and return values. The trace output is detailed andtypically very useful.
Use $trace_level 0 to disable the trace.
If $trace_filename is specified then the file is opened in appendmode and all trace output (including that from other handles)is redirected to that file.
See also the $h->trace() method and the DEBUGGING entry elsewhere in this document for informationabout the DBI_TRACE environment variable.
DBI Utility Functions
- neat
$str = DBI::neat($value, $maxlen);
Return a string containing a neat (and tidy) representation of thesupplied value.Strings will be quoted (but internal quotes will not be escaped).Numeric values will usually be unquoted. Undefined (NULL) values willbe shown as undef (without quotes). Unprintable characters will bereplaced by dot (.). For result strings longer than $maxlen (0 or undefdefaults to 400 characters) the result string will be truncated to$maxlen-4 and ...' will be appended.
This function is designed to format values for human consumption.It is used internally by the DBI for the trace entry elsewhere in this document output. It shouldtypically not be used for formating values for database use.
- neat_list
$str = DBI::neat_list(\@listref, $maxlen, $field_sep);
Calls DBI::neat on each element of the list and returns a stringcontaining the results joined with $field_sep. $field_sep defaultsto ", ".
- dump_results
$rows = DBI::dump_results($sth, $maxlen, $lsep, $fsep, $fh);
Fetches all the rows from $sth, calls DBI::neat_list for each row andprints the results to $fh (defaults to STDOUT) separated by $lsep(default "\n"). $fsep defaults to ", " and $maxlen defaults to 35.This function is designed as a handy utility for prototyping andtesting queries. Since it uses the neat_list entry elsewhere in this document which uses the neat entry elsewhere in this document whichformats the string for reading by humans, it's not recomended for datatransfer applications.
DBI Dynamic Attributes
These attributes are always associated with the last handle used.
Where an attribute is Equivalent to a method call, then refer tothe method call for all related documentation.
Warning: these attributes are provided as a convenience but theydo have limitations. Specifically, because they are associated withthe last handle used, they should only be used immediately aftercalling the method which `sets' them. they have a `short lifespan'.There may also be problems with the multi-threading in 5.005.
If in any doubt, use the corresponding method call.
- $DBI::err
- Equivalent to $h->err.
- $DBI::errstr
- Equivalent to $h->errstr.
- $DBI::state
- Equivalent to $h->state.
- $DBI::rows
- Equivalent to $h->rows.
METHODS COMMON TO ALL HANDLES
- err
$rv = $h->err;
Returns the native database engine error code from the last driverfunction called.
- errstr
$str = $h->errstr;
Returns the native database engine error message from the last driverfunction called.
- state
$str = $h->state;
Returns an error code in the standard SQLSTATE five character format.Note that the specific success code 00000 is translated to 0(false). If the driver does not support SQLSTATE then state willreturn S1000 (General Error) for all errors.
- trace
$h->trace($trace_level); $h->trace($trace_level, $trace_filename);
DBI trace information can be enabled for a specific handle (and anyfuture children of that handle) by setting the trace level using thetrace method.Use $trace_level 2 to see detailed call trace information includingparameters and return values. The trace output is detailed andtypically very useful.
Use $trace_level 0 to disable the trace.
If $trace_filename is specified then the file is opened in appendmode and all trace output (including that from other handles)is redirected to that file.
See also the DBI->trace() method and the DEBUGGING entry elsewhere in this document for informationabout the DBI_TRACE environment variable.
- func
$h->func(@func_arguments, $func_name);
The func method can be used to call private non-standard andnon-portable methods implemented by the driver. Note that the functionname is given as the last argument.This method is not directly related to calling stored procedures.Calling stored procedures is currently not defined by the DBI.Some drivers, such as DBD::Oracle, support it in non-portable ways.See driver documentation for more details.
ATTRIBUTES COMMON TO ALL HANDLES
These attributes are common to all types of DBI handles.
Some attributes are inherited by child handles. That is, the valueof an inherited attribute in a newly created statement handle is thesame as the value in the parent database handle. Changes to attributesin the new statement handle do not affect the parent database handleand changes to the database handle do not affect existing statementhandles, only future ones.
Attempting to set or get the value of an unknown attribute is fatal,except for private driver specific attributes (which all have namesstarting with a lowercase letter).
Example:
$h->{AttributeName} = ...; # set/write ... = $h->{AttributeName}; # get/read- Warn (boolean, inherited)
- Enables useful warnings for certain bad practices. Enabled by default. Someemulation layers, especially those for perl4 interfaces, disable warnings.
- CompatMode (boolean, inherited)
- Used by emulation layers (such as Oraperl) to enable compatible behaviourin the underlying driver (e.g., DBD::Oracle) for this handle. Not normallyset by application code.
- InactiveDestroy (boolean)
- This attribute can be used to disable the effect of destroying a handle(which would normally close a prepared statement or disconnect from thedatabase etc). It is specifically designed for use in unix applicationswhich `fork' child processes. Either the parent or the child process,but not both, should set InactiveDestroy on all their handles.
- PrintError (boolean, inherited)
- This attribute can be used to force errors to generate warnings (usingwarn) in addition to returning error codes in the normal way. When seton, any method which results in an error occuring ($DBI::err being settrue) will cause the DBI to effectively do warn("$DBI::errstr"). Notethat the contents of the warning are currently just $DBI::errstr butthat may change and should not be relied upon.
By default DBI->connect sets PrintError on (except for old-style connectusage, see connect for more details).
If desired, the warnings can be caught and processed using a $SIG{__WARN__}handler or modules like CGI::ErrorWrap.
- RaiseError (boolean, inherited)
- This attribute can be used to force errors to raise exceptions ratherthan simply return error codes in the normal way. It defaults to off.When set on, any method which results in an error occuring ($DBI::errbeing set true) will cause the DBI to effectively do croak("$DBI::errstr").
If PrintError is also on then the PrintError is done before theRaiseError unless no __DIE__ handler has been defined, in which casePrintError is skipped since the croak will print the message.
Note that the contents of $@ are currently just $DBI::errstr but thatmay change and should not be relied upon.
- ChopBlanks (boolean, inherited)
- This attribute can be used to control the trimming of trailing spacecharacters from fixed width char fields. No other field types areaffected.
The default is false (it is possible that that may change).Applications that need specific behaviour should set the attribute asneeded. Emulation interfaces should set the attribute to match thebehaviour of the interface they are emulating.
Drivers are not required to support this attribute but any driver whichdoes not must arrange to return undef as the attribute value.
- LongReadLen (integer, inherited)
- This attribute may be used to control the maximum length of `long' (or'blob') fields which the driver will read from the databaseautomatically when it fetches each row of data. A value of 0 meansdon't automatically fetch any long data (fetch should return undeffor long fields when LongReadLen is 0).
The default is typically 0 (zero) bytes but may vary between drivers.Most applications using long fields will set this value to slightlylarger than the longest long field value which will be fetched.
Changing the value of LongReadLen for a statement handle after it'sbeen prepare()'d will typically have no effect so it's usual toset LongReadLen on the $dbh before calling prepare.
See the LongTruncOk entry elsewhere in this document about truncation behaviour.
- LongTruncOk (boolean, inherited)
- This attribute may be used to control the effect of fetching a longfield value which has been truncated (typically because it's longerthan the value of the LongReadLen attribute).
By default LongTruncOk is false and fetching a truncated long valuewill cause the fetch to fail. (Applications should always take care tocheck for errors after a fetch loop in case an error, such as a divideby zero or long field truncation, caused the fetch to terminateprematurely.)
If a fetch fails due to a long field truncation when LongTruncOk isfalse, many drivers will allow you to continue fetching further rows.
DBI DATABASE HANDLE OBJECTS
Database Handle Methods
- prepare
$sth = $dbh->prepare($statement) || die $dbh->errstr; $sth = $dbh->prepare($statement, \%attr) || die $dbh->errstr;
Prepare a single statement for execution by the database engine andreturn a reference to a statement handle object which can be used toget attributes of the statement and invoke the the execute entry elsewhere in this document method.Note that prepare should never execute a statement, even if it is not aselect statement, it only prepares it for execution. (Having said that,some drivers, notably Oracle, will execute data definition statementssuch as create/drop table when they are prepared. In practice this israrely a problem.)
Drivers for engines which don't have the concept of preparing astatement will typically just store the statement in the returnedhandle and process it when $sth->execute is called. Such drivers arelikely to be unable to give much useful information about thestatement, such as $sth->{NUM_OF_FIELDS}, until after $sth->executehas been called. Portable applications should take this into account.
- do
$rc = $dbh->do($statement) || die $dbh->errstr; $rc = $dbh->do($statement, \%attr) || die $dbh->errstr; $rv = $dbh->do($statement, \%attr, @bind_values) || ...
Prepare and execute a statement. Returns the number of rows affected(-1 if not known or not available) or undef on error.This method is typically most useful for non-select statements whicheither cannot be prepared in advance (due to a limitation in thedriver) or which do not need to be executed repeatedly.
The default do method is logically similar to:
sub do { my($dbh, $statement, $attr, @bind_values) = @_; my $sth = $dbh->prepare($statement) or return undef; $sth->execute(@bind_values) or return undef; my $rows = $sth->rows; ($rows == 0) ? "0E0" : $rows; }Example: my $rows_deleted = $dbh->do(q{ delete from table where status = 'DONE' }) || die $dbh->errstr;Using placeholders and @bind_values with the do method can beuseful because it avoids the need to correctly quote any variablesin the $statement.
- commit
$rc = $dbh->commit || die $dbh->errstr;
Commit (make permanent) the most recent series of database changesif the database supports transactions.If the database supports transactions and AutoCommit is on then thecommit should issue a ``commit ineffective with AutoCommit'' warning.
See also the Transactions entry elsewhere in this document .
- rollback
$rc = $dbh->rollback || die $dbh->errstr;
Roll-back (undo) the most recent series of uncommitted databasechanges if the database supports transactions.If the database supports transactions and AutoCommit is on then therollback should issue a ``rollback ineffective with AutoCommit'' warning.
See also the Transactions entry elsewhere in this document .
- disconnect
$rc = $dbh->disconnect || warn $dbh->errstr;
Disconnects the database from the database handle. Typically only usedbefore exiting the program. The handle is of little use after disconnecting.The transaction behaviour of the disconnect method is, sadly,undefined. Some database systems (such as Oracle and Ingres) willautomatically commit any outstanding changes, but others (such asInformix) will rollback any outstanding changes. Applications shouldexplicitly call commit or rollback before calling disconnect.
The database is automatically disconnected (by the DESTROY method) ifstill connected when there are no longer any references to the handle.The DESTROY method for each driver should explicitly call rollback toundo any uncommitted changes. This is vital behaviour to ensure thatincomplete transactions don't get committed simply because Perl callsDESTROY on every object before exiting.
If you disconnect from a database while you still have active statementhandles you will get a warning. The statement handles should either becleared (destroyed) before disconnecting or the finish method called oneach one.
- ping
$rc = $dbh->ping;
Attempts to determine, in a reasonably efficient way, if the databaseserver is still running and the connection to it is still working.The default implementation currently always returns true withoutactually doing anything. Individual drivers should implement thisfunction in the most suitable manner for their database engine.
Very few applications would have any use for this method. See thespecialist Apache::DBI module for one example usage.
- quote
$sql = $dbh->quote($string);
Quote a string literal for use in an SQL statement by escaping anyspecial characters (such as quotation marks) contained within thestring and adding the required type of outer quotation marks. $sql = sprintf "select foo from bar where baz = %s", $dbh->quote("Don't\n");For most database types quote would return 'Don''t' (including theouter quotation marks).An undefined $string value will be returned as NULL (without quotationmarks).
Quote may not be able to deal with all possible input (such asbinary data) and should not be relied upon for security.
Database Handle Attributes
This section describes attributes specific to database handles.
Changes to these database handle attributes do not affect any otherexisting or future database handles.
Attempting to set or get the value of an unknown attribute is fatal,except for private driver specific attributes (which all have namesstarting with a lowercase letter).
Example:
$h->{AutoCommit} = ...; # set/write ... = $h->{AutoCommit}; # get/read- AutoCommit (boolean)
- If true then database changes cannot be rolled-back (undone). If falsethen database changes automatically occur within a `transaction' whichmust either be committed or rolled-back using the commit or rollbackmethods.
Drivers should always default to AutoCommit mode. (An unfortunatechoice forced on the DBI by ODBC and JDBC conventions.)
Attempting to set AutoCommit to an unsupported value is a fatal error.This is an important feature of the DBI. Applications which needfull transaction behaviour can set $dbh->{AutoCommit}=0 (or viaconnect) without having to check the value was assigned okay.
For the purposes of this description we can divide databases into threecategories:
Database which don't support transactions at all. Database in which a transaction is always active. Database in which a transaction must be explicitly started ('BEGIN WORK').* Database which don't support transactions at allFor these databases attempting to turn AutoCommit off is a fatal error.Commit and rollback both issue warnings about being ineffective whileAutoCommit is in effect.
* Database in which a transaction is always active
These are typically mainstream commercial relational databases with'ANSI standandard' transaction behaviour.
If AutoCommit is off then changes to the database won't have anylasting effect unless the commit entry elsewhere in this document is called (but see alsothe disconnect entry elsewhere in this document ). If the rollback entry elsewhere in this document is called then any changes since thelast commit are undone.
If AutoCommit is on then the effect is the same as if the DBI were tohave called commit automatically after every successful databaseoperation. In other words, calling commit or rollback explicitly whileAutoCommit is on would be ineffective because the changes wouldhave already been commited.
Changing AutoCommit from off to on should issue a the commit entry elsewhere in this document in most drivers.
Changing AutoCommit from on to off should have no immediate effect.
For databases which don't support a specific auto-commit mode, thedriver has to commit each statement automatically using an explicitCOMMIT after it completes successfully (and roll it back using anexplicit ROLLBACK if it fails). The error information reported to theapplication will correspond to the statement which was executed, unlessit succeeded and the commit or rollback failed.
* Database in which a transaction must be explicitly started
For these database the intention is to have them act like databases inwhich a transaction is always active (as described above).
To do this the DBI driver will automatically begin a transaction whenAutoCommit is turned off (from the default on state) and willautomatically begin another transaction after a the commit entry elsewhere in this document or the rollback entry elsewhere in this document .
In this way, the application does not have to treat these databases as aspecial case.
DBI STATEMENT HANDLE OBJECTS
Statement Handle Methods
- bind_param
$rc = $sth->bind_param($param_num, $bind_value) || die $sth->errstr; $rv = $sth->bind_param($param_num, $bind_value, \%attr) || ... $rv = $sth->bind_param($param_num, $bind_value, $bind_type) || ...
The bind_param method can be used to bind (assign/associate) a valuewith a placeholder embedded in the prepared statement. Placeholdersare indicated with question mark character (?). For example: $dbh->{RaiseError} = 1; # save having to check each method call $sth = $dbh->prepare("select name, age from people where name like ?"); $sth->bind_param(1, "John%"); # placeholders are numbered from 1 $sth->execute; DBI::dump_results($sth);Note that the ? is not enclosed in quotation marks even when theplaceholder represents a string. Some drivers also allow :1, :2etc and :name style placeholders in addition to ? but their useis not portable.Some drivers do not support placeholders.
With most drivers placeholders can't be used for any element of astatement that would prevent the database server validating thestatement and creating a query execution plan for it. For example:
"select name, age from ?" # wrong "select name, ? from people" # wrong
Also, placeholders can only represent single scalar values, so thisstatement, for example, won't work as expected for more than one value: "select name, age from people where name in (?)" # wrong
The \%attr parameter can be used to specify the data type theplaceholder should have. Typically the driver is only interested inknowing if the placeholder should be bound as a number or a string. $sth->bind_param(1, $value, { TYPE => SQL_INTEGER });As a short-cut for this common case, the data type can be passeddirectly inplace of the attr hash reference. This example isequivalent to the one above: $sth->bind_param(1, $value, SQL_INTEGER);
The TYPE cannot be changed after the first bind_param call (but it canbe left unspecified, in which case it defaults to the previous value).Perl only has string and number scalar data types. All database typesthat aren't numbers are bound as strings and must be in a format thedatabase will understand.
Undefined values or undef are be used to indicate null values.
- bind_param_inout
$rc = $sth->bind_param_inout($param_num, \$bind_value, $max_len) || die $sth->errstr; $rv = $sth->bind_param_inout($param_num, \$bind_value, $max_len, \%attr) || ... $rv = $sth->bind_param_inout($param_num, \$bind_value, $max_len, $bind_type) || ...
This method acts like the bind_param entry elsewhere in this document but also enables values to beoutput from (updated by) the statement. (The statement is typicallya call to a stored procedure.). The $bind_value must be passed as areference to the actual value to be used.The additional $max_len parameter specifies the amount of memory toallocate to $bind_value for the new value. Truncation behaviour, if thevalue is longer than $max_len, is currently undefined.
It is expected that few drivers will support this method. The onlydriver currently known to do so is DBD::Oracle. It should not beused for database independent applications.
- execute
$rv = $sth->execute || die $sth->errstr; $rv = $sth->execute(@bind_values) || die $sth->errstr;
Perform whatever processing is necessary to execute the preparedstatement. An undef is returned if an error occurs, a successfulexecute always returns true (see below). It is always important tocheck the return status of execute (and most other DBI methods).For a non-select statement execute returns the number of rows affected(if known). Zero rows is returned as ``0E0'' which Perl will treatas 0 but will regard as true. If the number of rows affected is notknown then execute returns -1.
For select statements execute simply `starts' the query within theEngine. Use one of the fetch methods to retreive the data aftercalling execute. The execute method does not return the number ofrows that will be returned by the query (because most Engines can'ttell in advance), it simply returns a true value.
If any arguments are given then execute will effectively callthe bind_param entry elsewhere in this document for each value before executing the statement.Values bound in this way are usually treated as SQL_VARCHAR typesunless the driver can determine the correct type (which is rare) orbind_param (or bind_param_inout) has already been used to specify thetype.
- fetchrow_arrayref
$ary_ref = $sth->fetchrow_arrayref; $ary_ref = $sth->fetch; # alias
Fetches the next row of data and returns a reference to an arrayholding the field values. If there are no more rows fetchrow_arrayrefreturns undef. Null values are returned as undef. This is the fastestway to fetch data, particularly if used with $sth->bind_columns.
- fetchrow_array
@ary = $sth->fetchrow_array;
An alternative to fetchrow_arrayref. Fetches the next row of dataand returns it as an array holding the field values. If there are nomore rows fetchrow_array returns an empty list. Null values arereturned as undef.
- fetchrow_hashref
$hash_ref = $sth->fetchrow_hashref;
An alternative to fetchrow_arrayref. Fetches the next row of dataand returns it as a reference to a hash containing field name and fieldvalue pairs. Null values are returned as undef. If there are no morerows fetchhash returns undef.The keys of the hash are the same names returned by $sth->{NAME}. Ifmore than one field has the same name there will only be one entry inthe returned hash.
Because of the extra work fetchrow_hashref and perl have to perform itis not as efficient as fetchrow_arrayref or fetchrow_array and is notrecommended where performance is very important. Currently a new hashreference is returned for each row. This is likely to change in thefuture so don't rely on it.
- fetchall_arrayref
$tbl_ary_ref = $sth->fetchall_arrayref;
The fetchall_arrayref method can be used to fetch all the data to bereturned from a prepared statement. It returns a reference to an arraywhich contains one array reference per row (as returned byfetchrow_arrayref).If there are no rows to return, fetchall_arrayref returns a reference to anempty array.
- finish
$rc = $sth->finish;
Indicates that no more data will be fetched from this statement beforeit is either prepared again or destroyed. It can sometimes be helpfulto call this method where appropriate in order to allow the server tofree up any internal resources (such as read locks) currently beingheld. It does not affect the transaction status of the session.The finish method has nothing to do with transactions. It's mostly aninternal `housekeeping' method. There's no need to call finish ifyou're about to destroy or re-use the statement handle. See alsothe disconnect entry elsewhere in this document .
- rows
$rv = $sth->rows;
Returns the number of rows affected by the last database alteringcommand, or -1 if not known or not available.Generally you can only rely on a row count after a do or non-selectexecute (for some specific operations like update and delete) orafter fetching all the rows of a select statement.
For select statements it is generally not possible to know how manyrows will be returned except by fetching them all. Some drivers willreturn the number of rows the application has fetched so far but othersmay return -1 until all rows have been fetched.
- bind_col
$rc = $sth->bind_col($column_number, \$var_to_bind); $rc = $sth->bind_col($column_number, \$var_to_bind, \%attr);
Binds a column (field) of a select statement to a perl variable.Whenever a row is fetched from the database the corresponding perlvariable is automatically updated. There is no need to fetch and assignthe values manually. This makes using bound variables very efficient.See bind_columns below for an example. Note that column numbers countup from 1.The binding is performed at a very low level using perl aliasing sothere is no extra copying taking place. So long as the driver uses thecorrect internal DBI call to get the array the fetch function returns,it will automatically support column binding.
The the bind_param entry elsewhere in this document method performs a similar function for input variables.See the section on /"Placeholders and Bind Values for more information.
- bind_columns
$rc = $sth->bind_columns(\%attr, @list_of_refs_to_vars_to_bind);
e.g. $dbh->{RaiseError} = 1; # do this, or check every call for errors $sth = $dbh->prepare(q{ select region, sales from sales_by_region }); my($region, $sales); # Bind perl variables to columns. $rv = $sth->bind_columns(undef, \$region, \$sales); # you can also use perl's \(...) syntax (see perlref docs): # $sth->bind_columns(undef, \($region, $sales)); # Column binding is the most efficient way to fetch data $sth->execute; while($sth->fetch) { print "$region: $sales\n"; }Calls bind_col for each column of the select statement. bind_columns willcroak if the number of references does not match the number of fields.
Statement Handle Attributes
This section describes attributes specific to statement handles. Mostof these attributes are read-only.
Changes to these statement handle attributes do not affect any otherexisting or future statement handles.
Attempting to set or get the value of an unknown attribute is fatal,except for private driver specific attributes (which all have namesstarting with a lowercase letter).
Example:
... = $h->{NUM_OF_FIELDS}; # get/readNote that some drivers cannot provide valid values for some or all ofthese attributes until after
$sth->execute has been called.
- NUM_OF_FIELDS (integer, read-only)
- Number of fields (columns) the prepared statement will return. Non-selectstatements will have NUM_OF_FIELDS == 0.
- NUM_OF_PARAMS (integer, read-only)
- The number of parameters (placeholders) in the prepared statement.See SUBSTITUTION VARIABLES below for more details.
- NAME (array-ref, read-only)
- Returns a reference to an array of field names for each column. Thenames may contain spaces but should not be truncated or have anytrailing space.
print "First column name: $sth->{NAME}->[0]\n";
- NULLABLE (array-ref, read-only)
- Returns a reference to an array indicating the possibility of eachcolumn returning a null.
print "First column may return NULL\n" if $sth->{NULLABLE}->[0];
- CursorName (string, read-only)
- Returns the name of the cursor associated with the statement handle ifavailable. If not available or the database driver does not support the"where current of ..." SQL syntax then it returns undef.
TRANSACTIONS
Transactions are a fundamental part of any robust database system. Theyprotect against errors and database corruption by ensuring that sets ofrelated changes to the database take place in atomic (indivisible,all-or-nothing) units.
See the AutoCommit entry elsewhere in this document for details of using AutoCommit with various types ofdatabase.
Robust Applications
This section applies to databases which support transactions and whereAutoCommit is off.
The recommended way to implement robust transactions in Perlapplications is to make use of eval { ... } (which is very fast,unlike eval "...").
eval { foo(...) # do lots of work here bar(...) # including inserts baz(...) # and updates }; if ($@) { $dbh->rollback; # add other application on-error-clean-up code here } else { $dbh->commit; }The code in
foo(), or any other code executed from within the curly braces,can be implemented in this way:
$h->method(@args) || die $h->errstr
or the
$h->{RaiseError} attribute can be set on, in which case the
DBIwill automatically
croak() on error so you don't have to test thereturn value of each method call. See the
RaiseError entry elsewhere in this document for more details.
A major advantage of the eval approach is that the transaction will beproperly rolled back if any code in the inner application croaks ordies for any reason. The major advantage of using the $h->{RaiseError}attribute is that all DBI calls will be checked automatically. Bothtechniques are recommended.
HANDLING BLOB / LONG FIELDS
Many databases support `blob' (binary large objects), `long' or similardatatypes for holding very long strings or large amounts of binarydata in a single field. Some databases support variable length longvalues over 2,000,000,000 bytes in length.
Since values of that size can't usually be held in memory and becausedatabases can't usually know in advance the length of the longest longthat will be returned from a select statement (unlike other datatypes) some special handling is required.
In this situation the value of the $h->{LongReadLen} attribute isused to determine how much buffer space to allocate for such fields.The $h->{LongTruncOk} attribute is used to determine how to behaveif a fetched value can't fit into the buffer.
SIMPLE EXAMPLE
my $dbh = DBI->connect("dbi:Oracle:$data_source", $user, $password) || die "Can't connect to $data_source: $DBI::errstr"; my $sth = $dbh->prepare( q{ SELECT name, phone FROM mytelbook }) || die "Can't prepare statement: $DBI::errstr"; my $rc = $sth->execute || die "Can't execute statement: $DBI::errstr";
print "Query will return $sth->{NUM_OF_FIELDS} fields.\n\n"; print "$sth->{NAME}->[0]: $sth->{NAME}->[1]\n"; while (($name, $phone) = $sth->fetchrow_array) { print "$name: $phone\n"; } # check for problems which may have terminated the fetch early warn $DBI::errstr if $DBI::err; $sth->finish;
DEBUGGING
In addition to the the
trace entry elsewhere in this document method you can enable the same traceinformation by setting the DBI_TRACE environment variable beforestarting perl.
On unix-like systems using a bourne-like shell you can do this easilyfor a single command:
DBI_TRACE=2 perl your_test_script.pl
If DBI_TRACE is set to a non-numeric value then it is assumed tobe a file name and the trace level will be set to 2 with all traceoutput will be appended to that file.
See also the the trace entry elsewhere in this document method.
WARNINGS
The DBI is
alpha software. It is
only `alpha' because theinterface (api) is not finalised. The alpha status does not reflectcode quality.
SEE ALSO
Database Documentation
SQL Language Reference Manual.
Books and Journals
Programming Perl 2nd Ed. by Larry Wall, Tom Christiansen & Randal Schwartz. Learning Perl by Randal Schwartz.
Dr Dobb's Journal, November 1996. The Perl Journal, April 1997.
Manual Pages
the perl(1) manpage, the perlmod(1) manpage, the perlbook(1) manpage
Mailing List
The dbi-users mailing list is the primary means of communication amonguses of the DBI and its related modules. Subscribe and unsubscribe via:
http://www.fugue.com/dbi
Mailing list archives are held at:
http://www.rosat.mpe-garching.mpg.de/mailing-lists/PerlDB-Interest/ http://outside.organic.com/mail-archives/dbi-users/ http://www.coe.missouri.edu/~faq/lists/dbi.html
Assorted Related WWW Links
The DBI `Home Page' (not maintained by me):
http://www.arcana.co.uk/technologia/DBI
Other related links:
http://www-ccs.cs.umass.edu/db.html http://www.odmg.org/odmg93/updates_dbarry.html http://www.jcc.com/sql_stnd.html ftp://alpha.gnu.ai.mit.edu/gnu/gnusql-0.7b3.tar.gz
FAQ
Please also read the DBI FAQ which is installed as a DBI::FAQ module soyou can use perldoc to read it by executing the perldoc DBI::FAQ command.
AUTHORS
DBI by Tim Bunce. This pod text by Tim Bunce, J. Douglas Dunlop,Jonathan Leffler and others. Perl by Larry Wall and theperl5-porters.
COPYRIGHT
The DBI module is Copyright (c) 1995,1996,1997 Tim Bunce. England.All rights reserved.
You may distribute under the terms of either the GNU General PublicLicense or the Artistic License, as specified in the Perl README file.
ACKNOWLEDGEMENTS
I would like to acknowledge the valuable contributions of the manypeople I have worked with on the DBI project, especially in the earlyyears (1992-1994). In no particular order: Kevin Stock, Buzz Moschetti,Kurt Andersen, Ted Lemon, William Hails, Garth Kennedy, Michael Peppler,Neil S. Briscoe, Jeff Urlwin, David J. Hughes, Jeff Stander,Forrest D Whitcher, Larry Wall, Jeff Fried, Roy Johnson, Paul Hudson,Georg Rehfeld, Steve Sizemore, Ron Pool, Jon Meek, Tom Christiansen,Steve Baumgarten, Randal Schwartz, and a whole lot more.
SUPPORT / WARRANTY
The DBI is free software. IT COMES WITHOUT WARRANTY OF ANY KIND.
Commercial support agreements for Perl and the DBI, DBD::Oracle andOraperl modules can be arranged via The Perl Clinic. Seehttp://www.perl.co.uk/tpc for more details.
OUTSTANDING ISSUES TO DO
data types (ISO type numbers and type name conversions) error handling data dictionary methods test harness support methods portability blob_read etc
FREQUENTLY ASKED QUESTIONS
See the DBI FAQ for a more comprehensive list of FAQs. Use the
perldoc DBI::FAQ command to read it.
Why doesn't my CGI script work right?
Read the information in the references below. Please do not postCGI related questions to the dbi-users mailing list (or to me).
http://www.perl.com/perl/faq/idiots-guide.html http://www3.pair.com/webthing/docs/cgi/faqs/cgifaq.shtml http://www.perl.com/perl/faq/perl-cgi-faq.html http://www-genome.wi.mit.edu/WWW/faqs/www-security-faq.html http://www.boutell.com/faq/ http://www.perl.com/perl/faq/
General problems and good ideas:
Use the CGI::ErrorWrap module. Remember that many env vars won't be set for CGI scripts
How can I maintain a WWW connection to a database?
For information on the Apache httpd server and the mod_perl module see
http://perl.apache.org/
A driver build fails because it can't find DBIXS.h
The installed location of the DBIXS.h file changed with 0.77 (it wasbeing installed into the `wrong' directory but that's where driverdevelopers came to expect it to be). The first thing to do is check tosee if you have the latest version of your driver. Driver authors willbe releasing new versions which use the new location. If you have thelatest then ask for a new release. You can edit the Makefile.PL fileyourself. Change the part which reads "-I.../DBI" so it reads"-I.../auto/DBI" (where ... is a string of non-space characters).
Has the DBI and DBD::Foo been ported to NT / Win32?
The latest version of the DBI and, at least, the DBD::Oracle modulewill build - without changes - on NT/Win32 if your are using thestandard Perl 5.004 and not the ActiveWare port.
Jeffrey Urlwin <jurlwin@access.digex.net> (or <jurlwinAATThq.caci.com>) ishelping me with the port (actually he's doing it and I'm integratingthe changes :-).
What about ODBC?
A DBD::ODBC module is available.
Does the DBI have a year 2000 problem?
No. The DBI has no knowledge or understanding of dates at all.
Individual drivers (DBD::*) may have some date handling code but areunlikely to have year 2000 related problems within their code. However,your application code which uses the DBI and DBD drivers may haveyear 2000 related problems if it has not been designed and writtem well.
See also the ``Does Perl have a year 2000 problem?'' section of the Perl FAQ:
http://www.perl.com/CPAN/doc/FAQs/FAQ/PerlFAQ.html
KNOWN DRIVER MODULES
- ODBC - DBD::ODBC
Author: Tim Bunce Email: dbi-usersAATTfugue.com
- Oracle - DBD::Oracle
Author: Tim Bunce Email: dbi-usersAATTfugue.com
- Ingres - DBD::Ingres
Author: Henrik Tougaard Email: ht@datani.dk, dbi-usersAATTfugue.com
- mSQL - DBD::mSQL
- DB2 - DBD::DB2
- Empress - DBD::Empress
- Informix - DBD::Informix
Author: Jonathan Leffler Email: johnl@informix.com, dbi-usersAATTfugue.com
- Solid - DBD::Solid
Author: Thomas Wenrich Email: wenrich@site58.ping.at, dbi-usersAATTfugue.com
- Postgres - DBD::Pg
Author: Edmund Mergl Email: E.Mergl@bawue.de, dbi-usersAATTfugue.com
- Fulcrum SearchServer - DBD::Fulcrum
Author: Davide Migliavacca Email: davide.migliavaccaAATTinferentia.it
OTHER RELATED WORK AND PERL MODULES
- Apache::DBI by E.MerglAATTbawue.de
- To be used with the Apache daemon together with an embedded perlinterpreter like mod_perl. Establishes a database connection whichremains open for the lifetime of the http daemon. This way the CGIconnect and disconnect for every database access becomes superfluous.
- JDBC Server by Stuart `Zen' Bishop <zenAATTbf.rmit.edu.au>
- The server is written in Perl. The client classes that talk to it are of course in Java. Thus, a Java applet or application will be able to comunicate via the JDBC API with any database that has a DBI driver installed.The URL used is in the form jdbc:dbi://host.domain.etc:999/Driver/DBName.It seems to be very similar to some commercial products, such as jdbcKona.
- Remote Proxy DBD support
Carl Declerck <carlAATTmiskatonic.inbe.net> Terry Greenlaw <z50816AATTmip.mar.lmco.com>
Carl is developing a generic proxy object module which could form the basisof a DBD::Proxy driver in the future. Terry is doing something similar.
- SQL Parser
Hugo van der Sanden <hvAATTcrypt.compulink.co.uk> Stephen Zander <stephen.zanderAATTmckesson.com>
Based on the O'Reilly lex/yacc book examples and byacc.
Index
- NAME
- SYNOPSIS
- DESCRIPTION
- THE DBI CLASS
- METHODS COMMON TO ALL HANDLES
- ATTRIBUTES COMMON TO ALL HANDLES
- DBI DATABASE HANDLE OBJECTS
- DBI STATEMENT HANDLE OBJECTS
- TRANSACTIONS
- HANDLING BLOB / LONG FIELDS
- SIMPLE EXAMPLE
- DEBUGGING
- WARNINGS
- SEE ALSO
- AUTHORS
- COPYRIGHT
- ACKNOWLEDGEMENTS
- SUPPORT / WARRANTY
- OUTSTANDING ISSUES TO DO
- FREQUENTLY ASKED QUESTIONS
- KNOWN DRIVER MODULES
- OTHER RELATED WORK AND PERL MODULES
This document was created byman2html,using the manual pages.