Teng::Schema::Dumper - Schema code generator
use DBI; use Teng::Schema::Dumper; my $dbh = DBI->connect(@dsn) or die; print Teng::Schema::Dumper->dump(dbh => $dbh, namespace => 'Mock::DB');
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.
do "my/schema.pl"
THIS MODULE IS HIGHLY EXPERIMENTAL. DO NOT USE THIS FOR PRODUCTION ENVIRONMENT.
This is the method to generate code from DB. It returns the Perl5 code in string.
The arguments are:
Database handle from DBI.
your project teng namespace.
To install Teng, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Teng
CPAN shell
perl -MCPAN -e shell install Teng
For more information on module installation, please visit the detailed CPAN module installation guide.