Test::DB::Mysql

Temporary Mysql Database for Testing

method: create method: destroy

package main;

use Test::DB::Mysql;

my $tdbi = Test::DB::Mysql->new;

Types::Standard

Test::DB::Object

Data::Object::Role::Buildable Data::Object::Role::Immutable Data::Object::Role::Stashable

dbh: ro, opt, Object dsn: ro, opt, Str database: ro, opt, Str hostname: ro, opt, Str hostport: ro, opt, Str username: ro, opt, Str password: ro, opt, Str

This package provides methods for generating and destroying Mysql databases for testing purposes. The attributes can be set using their respective environment variables: TESTDB_DATABASE, TESTDB_USERNAME, TESTDB_PASSWORD, TESTDB_HOSTNAME, and TESTDB_HOSTPORT.

The create method creates a temporary database and returns the invocant.

create() : Object

=example-1 create

# given: synopsis

$tdbi->create;

# <Test::DB::Mysql>

The destroy method destroys (drops) the database and returns the invocant.

destroy() : Object

=example-1 destroy

# given: synopsis

$tdbi->create;
$tdbi->destroy;

# <Test::DB::Mysql>

13 POD Errors

The following errors were encountered while parsing the POD:

Around line 10:

Unknown directive: =name

Around line 16:

Unknown directive: =abstract

Around line 22:

Unknown directive: =includes

Around line 29:

Unknown directive: =synopsis

Around line 39:

Unknown directive: =libraries

Around line 45:

Unknown directive: =inherits

Around line 51:

Unknown directive: =integrates

Around line 59:

Unknown directive: =attributes

Around line 71:

Unknown directive: =description

Around line 80:

Unknown directive: =method

Around line 84:

Unknown directive: =signature

Around line 98:

Unknown directive: =method

Around line 102:

Unknown directive: =signature