1 package Catalyst::Helper::Model::DBIC::Schema;
9 Catalyst::Helper::Model::DBIC::Schema - Helper for DBIC Schema Models
13 script/create.pl model Foo DBIC::Schema Foo::SchemaClass [ dsn user password ]
16 Foo is the short name for the Model class being generated
17 Foo::SchemaClass is the fully qualified classname of your Schema,
18 which isa DBIx::Class::Schema defined elsewhere.
19 dsn, user, and password are optional if connection info is already
20 defined in your Schema class (as it would be in the case of
21 DBIx::Class::Schema::Loader).
25 Helper for the DBIC Plain Models.
34 my ( $self, $helper, $schema_class, $dsn, $user, $pass ) = @_;
36 $helper->{schema_class} = $schema_class || '';
39 $helper->{setup_connect_info} = 1;
40 $helper->{dsn} = $dsn || '';
41 $helper->{user} = $user || '';
42 $helper->{pass} = $pass || '';
45 my $file = $helper->{file};
46 $helper->render_file( 'compclass', $file );
51 L<Catalyst::Manual>, L<Catalyst::Test>, L<Catalyst::Request>,
52 L<Catalyst::Response>, L<Catalyst::Helper>
56 Brandon L Black, C<blblack@gmail.com>
60 This library is free software, you can redistribute it and/or modify
61 it under the same terms as Perl itself.
73 use base 'Catalyst::Model::DBIC::Schema';
76 schema_class => '[% schema_class %]',
77 [% IF setup_connect_info %]
78 connect_info => [ '[% dsn %]',
84 ShowErrorStatement => 1,
94 [% class %] - Catalyst DBIC Plain Model
102 Catalyst::Model::DBIC::Schema Model
110 This library is free software, you can redistribute it and/or modify
111 it under the same terms as Perl itself.