Test::DB::Sqlite - Temporary Testing Databases for Sqlite
Temporary Sqlite Database for Testing
package main; use Test::DB::Sqlite; my $tdbo = Test::DB::Sqlite->new; # my $dbh = $tdbo->create->dbh;
This package provides methods for generating and destroying Sqlite databases for testing purposes.
This package inherits behaviors from:
Test::DB::Object
This package integrates behaviors from:
Data::Object::Role::Buildable
Data::Object::Role::Immutable
Data::Object::Role::Stashable
This package uses type constraints from:
Types::Standard
This package has the following attributes:
database(Str)
This attribute is read-only, accepts (Str) values, and is optional.
(Str)
dbh(Object)
This attribute is read-only, accepts (Object) values, and is optional.
(Object)
dsn(Str)
file(Str)
uri(Str)
This package implements the following methods:
clone(Str $source) : Object
The clone method creates a temporary database from a database template.
# given: synopsis $tdbo->clone('source.db'); # <Test::DB::Sqlite>
create() : Object
The create method creates a temporary database and returns the invocant.
# given: synopsis $tdbo->create; # <Test::DB::Sqlite>
destroy() : Object
The destroy method destroys (drops) the database and returns the invocant.
# given: synopsis $tdbo->create; $tdbo->destroy; # <Test::DB::Sqlite>
Al Newkirk, awncorp@cpan.org
awncorp@cpan.org
Copyright (C) 2011-2019, Al Newkirk, et al.
This is free software; you can redistribute it and/or modify it under the terms of the The Apache License, Version 2.0, as elucidated in the "license file".
Wiki
Project
Initiatives
Milestones
Contributing
Issues
To install Test::DB, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Test::DB
CPAN shell
perl -MCPAN -e shell install Test::DB
For more information on module installation, please visit the detailed CPAN module installation guide.