.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Test::Database::Handle 3pm" .TH Test::Database::Handle 3pm "2021-11-12" "perl v5.32.1" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Test::Database::Handle \- A class for Test::Database handles .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Test::Database; \& \& my $handle = Test::Database\->handle(@requests); \& my $dbh = $handle\->dbh(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" Test::Database::Handle is a very simple class for encapsulating the information about a test database handle. .PP Test::Database::Handle objects are used within a test script to obtain the necessary information about a test database handle. Handles are obtained through the \f(CW\*(C`Test::Database\->handles()\*(C'\fR or \f(CW\*(C`Test::Database\->handle()\*(C'\fR methods. .SH "METHODS" .IX Header "METHODS" Test::Database::Handle provides the following methods: .SS "new" .IX Subsection "new" Return a new Test::Database::Handle with the given parameters (\f(CW\*(C`dsn\*(C'\fR, \f(CW\*(C`username\*(C'\fR, \f(CW\*(C`password\*(C'\fR). .PP The only mandatory argument is \f(CW\*(C`dsn\*(C'\fR. .SH "ACCESSORS" .IX Header "ACCESSORS" The following accessors are available. .SS "dsn" .IX Subsection "dsn" Return the Data Source Name. .SS "username" .IX Subsection "username" Return the connection username. Defaults to \f(CW\*(C`undef\*(C'\fR. .SS "password" .IX Subsection "password" Return the connection password. Defaults to \f(CW\*(C`undef\*(C'\fR. .SS "connection_info" .IX Subsection "connection_info" Return the connection information triplet (\f(CW\*(C`dsn\*(C'\fR, \f(CW\*(C`username\*(C'\fR, \f(CW\*(C`password\*(C'\fR). .PP .Vb 1 \& my ( $dsn, $username, $password ) = $handle\->connection_info; .Ve .SS "dbh" .IX Subsection "dbh" .Vb 2 \& my $dbh = $handle\->dbh; \& my $dbh = $handle\->dbh( $attr ); .Ve .PP Return the \s-1DBI\s0 database handle obtained when connecting with the connection triplet returned by \f(CW\*(C`connection_info()\*(C'\fR. .PP The optional parameter \f(CW$attr\fR is a reference to a hash of connection attributes, passed directly to \s-1DBI\s0's \f(CW\*(C`connect()\*(C'\fR method. .SS "name" .IX Subsection "name" Return the database name attached to the handle. .SS "dbd" .IX Subsection "dbd" Return the \s-1DBI\s0 driver name, as computed from the \f(CW\*(C`dsn\*(C'\fR. .SS "driver" .IX Subsection "driver" Return the Test::Database::Driver object attached to the handle. .SH "AUTHOR" .IX Header "AUTHOR" Philippe Bruhat (BooK), \f(CW\*(C`\*(C'\fR .SH "COPYRIGHT" .IX Header "COPYRIGHT" Copyright 2008\-2010 Philippe Bruhat (BooK), all rights reserved. .SH "LICENSE" .IX Header "LICENSE" This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.