GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  TEST::DATABASE::HANDLE (3)

.ds Aq ’

NAME

Test::Database::Handle - A class for Test::Database handles

CONTENTS

SYNOPSIS



    use Test::Database;

    my $handle = Test::Database->handle(@requests);
    my $dbh    = $handle->dbh();



DESCRIPTION

Test::Database::Handle is a very simple class for encapsulating the information about a test database handle.

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 Test::Database->handles() or Test::Database->handle() methods.

METHODS

Test::Database::Handle provides the following methods:

    new

Return a new Test::Database::Handle with the given parameters (dsn, username, password).

The only mandatory argument is dsn.

ACCESSORS

The following accessors are available.

    dsn

Return the Data Source Name.

    username

Return the connection username. Defaults to undef.

    password

Return the connection password. Defaults to undef.

    connection_info

Return the connection information triplet (dsn, username, password).



    my ( $dsn, $username, $password ) = $handle->connection_info;



    dbh



    my $dbh = $handle->dbh;
    my $dbh = $handle->dbh( $attr );



Return the DBI database handle obtained when connecting with the connection triplet returned by connection_info().

The optional parameter $attr is a reference to a hash of connection attributes, passed directly to DBI’s connect() method.

    name

Return the database name attached to the handle.

    dbd

Return the DBI driver name, as computed from the dsn.

    driver

Return the Test::Database::Driver object attached to the handle.

AUTHOR

Philippe Bruhat (BooK), <book@cpan.org>

COPYRIGHT

Copyright 2008-2010 Philippe Bruhat (BooK), all rights reserved.

LICENSE

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 TEST::DATABASE::HANDLE (3) 2014-05-24

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.