Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

test::database::handle(3pm) [debian man page]

Test::Database::Handle(3pm)				User Contributed Perl Documentation			       Test::Database::Handle(3pm)

NAME
Test::Database::Handle - A class for Test::Database handles 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( %args ) Return a new "Test::Database::Handle" with the given parameters ("dsn", "username", "password"). The only mandatory argument is "dsn". The following accessors are available. dsn() Return the Data Source Name. username() Return the connection username. password() Return the connection password. connection_info() Return the connection information triplet ("dsn", "username", "password"). 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. perl v5.10.1 2010-11-27 Test::Database::Handle(3pm)

Check Out this Related Man Page

Authen::Simple::DBI(3pm)				User Contributed Perl Documentation				  Authen::Simple::DBI(3pm)

NAME
Authen::Simple::DBI - Simple DBI authentication SYNOPSIS
use Authen::Simple::DBI; my $dbi = Authen::Simple::DBI->new( dsn => 'dbi:SQLite:dbname=database.db', statement => 'SELECT password FROM users WHERE username = ?' ); if ( $dbi->authenticate( $username, $password ) ) { # successfull authentication } # or as a mod_perl Authen handler PerlModule Apache::DBI PerlModule Authen::Simple::Apache PerlModule Authen::Simple::DBI PerlSetVar AuthenSimpleDBI_dsn "dbi:SQLite:dbname=database.db" PerlSetVar AuthenSimpleDBI_statement "SELECT password FROM users WHERE username = ?" <Location /protected> PerlAuthenHandler Authen::Simple::DBI AuthType Basic AuthName "Protected Area" Require valid-user </Location> DESCRIPTION
DBI authentication. METHODS
* new This method takes a hash of parameters. The following options are valid: * dsn Database Source Name. Required. dsn => 'dbi:SQLite:dbname=database.db' dsn => 'dbi:mysql:database=database;host=localhost;' * statement SQL statement. The statement must take a single string argument (username) and return a single value (password). Required. statement => 'SELECT password FROM users WHERE username = ?' * username Database username. username => 'username' * password Database password. password => 'secret' * log Any object that supports "debug", "info", "error" and "warn". log => Log::Log4perl->get_logger('Authen::Simple::DBI') * authenticate( $username, $password ) Returns true on success and false on failure. SEE ALSO
Authen::Simple. Authen::Simple::Password. DBI. AUTHOR
Christian Hansen "ch@ngmedia.com" COPYRIGHT
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.8 2008-02-29 Authen::Simple::DBI(3pm)
Man Page