1 package Catalyst::Helper::Model::DBIC::SchemaInlineLoader;
9 Catalyst::Helper::Model::DBIC::SchemaInlineLoader - Helper for AutoLoaded DBIC Schema Models
13 script/create.pl model Foo DBIC::SchemaInlineLoader dsn user password
16 Foo is the short name for the Model class being generated
17 dsn, user, and password are the connection info
21 This helper generates a Catalyst::Model::DBIC::Schema class based upon a
22 generated inline DBIx::Class::Schema::Loader definition. Nothing external
23 to the generated class is required.
25 Models generated by this Helper require the seperate package
26 L<DBIx::Class::Schema::Loader> to be installed. It is on the recommended
27 list for this package, but is not required for installation.
36 my ( $self, $helper, $dsn, $user, $pass ) = @_;
38 $helper->{dsn} = $dsn || '';
39 $helper->{user} = $user || '';
40 $helper->{pass} = $pass || '';
42 my $file = $helper->{file};
43 $helper->render_file( 'compclass', $file );
48 General Catalyst Stuff:
50 L<Catalyst::Manual>, L<Catalyst::Test>, L<Catalyst::Request>,
51 L<Catalyst::Response>, L<Catalyst::Helper>, L<Catalyst>,
53 Stuff related to DBIC and this Model style:
55 L<DBIx::Class>, L<DBIx::Class::Schema>,
56 L<DBIx::Class::Schema::Loader>, L<Catalyst::Helper::Model::DBIC::Schema>,
57 L<Catalyst::Helper::Model::DBIC::SchemaInlineLoader>
61 Brandon L Black, C<blblack@gmail.com>
65 This library is free software, you can redistribute it and/or modify
66 it under the same terms as Perl itself.
75 package [% %]_[% class %]::Schema;
78 use base qw/DBIx::Class::Schema::Loader/;
80 __PACKAGE__->load_from_connection(
87 ShowErrorStatement => 1,
98 use base 'Catalyst::Model::DBIC::Schema';
101 schema_class => '_[% class %]::Schema',
106 [% class %] - Catalyst DBIC Plain Model
114 Catalyst::Model::DBIC::Schema Model
122 This library is free software, you can redistribute it and/or modify
123 it under the same terms as Perl itself.