Perl Diver 2.33
Main Environment Variables Perl Default Values Perl Config - Summary Perl Config - Full Installed Modules List Directory uptime Docs

Module Documentation
Details and documentation about a specific module, including version and documentation (if available). Note that while links to perldoc.com and search.cpan.org are provided, the module may be part of a larger distribution. If you reach a File Not Found page on either site, please try the parent module.

Class::DBI::Test::SQLite

Name Class::DBI::Test::SQLite
Version
Located at /usr/share/perl5
File /usr/share/perl5/Class/DBI/Test/SQLite.pm
Is Core No
Search CPAN for this module Class::DBI::Test::SQLite
Documentation Class::DBI::Test::SQLite
Module Details Class::DBI::Test::SQLite

NAME

Class::DBI::Test::SQLite - Base class for Class::DBI tests


SYNOPSIS

        use base 'Class::DBI::Test::SQLite';
        __PACKAGE__->set_table('test');
        __PACKAGE__->columns(All => qw/id name film salary/);
        sub create_sql { 
                return q{
                        id     INTEGER PRIMARY KEY,
                        name   CHAR(40),
                        film   VARCHAR(255),
                        salary INT
                }
        }

=head1 DESCRIPTION

This provides a simple base class for Class::DBI tests using SQLite. Each class for the test should inherit from this, provide a create_sql() method which returns a string representing the SQL used to create the table for the class, and then call set_table() to create the table, and tie it to the class.


METHODS

set_table

        __PACKAGE__->set_table('test');

This combines creating the table with the normal Class::DBI table() call.

create_sql (abstract)

        sub create_sql { 
                return q{
                        id     INTEGER PRIMARY KEY,
                        name   CHAR(40),
                        film   VARCHAR(255),
                        salary INT
                }
        }

This should return, as a text string, the schema for the table represented by this class.

Perl Diver brought to you by ScriptSolutions.com © 1997- 2026