| Catalyst-Model-DBIDM documentation | Contained in the Catalyst-Model-DBIDM distribution. |
Catalyst::Helper::Model::DBIDM - Helper for DBIx::DataModel Schema Models
script/create.pl model CatalystModelName DBIDM MyApp::SchemaClass [ MyApp::SchemaCreatorClass ]
Helper for the DBIx::DataModel Schema Models.
CatalystModelName is the short name for the Catalyst Model class
being generated (i.e. callable with $c->model('CatalystModelName')).
It should thus not start with MyApp::Model.
MyApp::SchemaClass is the fully qualified classname of your Schema. Note
that you should have a good reason to create this under a new global namespace,
otherwise use an existing top level namespace for your schema class.
MyApp::SchemaCreatorClass is the fully qualified name of the class that
creates your Schema (the one that runs
DBIx::DataModel->Schema('MyApp::SchemaClass')). If present, the
generated model class will include a use statement to run this schema
creator class.
General Catalyst Stuff:
Catalyst::Manual, Catalyst::Test, Catalyst::Request, Catalyst::Response, Catalyst::Helper, Catalyst,
Stuff related to DBIC and this Model style:
DBIx::Class, DBIx::Class::Schema, DBIx::Class::Schema::Loader, Catalyst::Model::DBIC::Schema
Cedric Bouvier cbouvi@gmail.com, largely inspired by the works of Brandon L
Black, blblack@gmail.com
This library is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
| Catalyst-Model-DBIDM documentation | Contained in the Catalyst-Model-DBIDM distribution. |
package Catalyst::Helper::Model::DBIDM; use strict; use warnings; our $VERSION = '0.01'; use Carp;
sub mk_compclass { my ( $self, $helper, $schema_class, $schema_creator_class) = @_; $helper->{schema_class} = $schema_class or croak "Must supply schema class name"; $helper->{schema_creator_class} = $schema_creator_class; my $file = $helper->{file}; $helper->render_file( 'compclass', $file ); }
1; __DATA__
1;