Mesoderm

Schema class scaffold generator for DBIx::Class
Download

Mesoderm Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Graham Barr
  • Publisher web site:
  • http://search.cpan.org/~gbarr/

Mesoderm Tags


Mesoderm Description

Mesoderm is a Perl module that creates a scaffold of code for DBIx::Class using a schema object from SQL::Translator. At time of writing the version of SQL::Translator required is not available on CPAN and must be fetched directly from github.The result is a hierarchy of packages describes below. Moose is used so that any custom methods needed to be added to the result or resultset classes can be done by writing Moose::Role classes. This allows separation between generated code and written code.Mesoderm defines methods to map table names to class names, relationships and columns to accessor methods. It is also possible to have any table, relationship or column excluded from the generated model. If the defaults do not meet your needs, then it is trvial to subclass Mesoderm and provide overrides.SYNOPSIS use Mesoderm; use SQL::Translator; use DBI; my $dbh = DBI->connect($dsn, $user, $pass); my $sqlt = SQL::Translator->new(dbh => $dbh, from => 'DBI'); $sqlt->parse(undef); my $scaffold = Mesoderm->new( schema => $sqlt->schema, schema_class => 'My::Schema', ); $scaffold->produce(\*STDOUT);Product's homepage


Mesoderm Related Software