The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Teng::Schema::Dumper - Schema code generator

SYNOPSIS

    use DBI;
    use Teng::Schema::Dumper;

    my $dbh = DBI->connect(@dsn) or die;
    print Teng::Schema::Dumper->dump(dbh => $dbh, namespace => 'Mock::DB');

DESCRIPTION

This module generates the Perl code to generate Teng::Schema instance.

You can use it by do "my/schema.pl" or embed it to the package.

THIS MODULE IS HIGHLY EXPERIMENTAL. DO NOT USE THIS FOR PRODUCTION ENVIRONMENT.

METHODS

Teng::Schema::Dumper->dump(dbh => $dbh, namespace => $namespace);

This is the method to generate code from DB. It returns the Perl5 code in string.

The arguments are:

dbh

Database handle from DBI.

namespace

your project teng namespace.