| Catalyst-Model-DBIC-Plain documentation | Contained in the Catalyst-Model-DBIC-Plain distribution. |
Catalyst::Helper::Model::DBIC::Plain - Helper for DBIC Plain Model
script/create.pl model DBIC DBIC::Plain dsn user password
Helper for the DBIC Plain Model.
Catalyst::Manual, Catalyst::Test, Catalyst::Request, Catalyst::Response, Catalyst::Helper
Danijel Milicevic, info@danijel.de
Andy Grundman
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
[% class %] - DBIC Plain Model Component
See [% app %]
DBIC Plain Model Component.
[% author %]
This library is free software . You can redistribute it and/or modify it under the same terms as perl itself.
| Catalyst-Model-DBIC-Plain documentation | Contained in the Catalyst-Model-DBIC-Plain distribution. |
package Catalyst::Helper::Model::DBIC::Plain; use strict;
sub mk_compclass { my ( $self, $helper, $dsn, $user, $pass ) = @_; $helper->{dsn} = $dsn || ''; $helper->{user} = $user || ''; $helper->{pass} = $pass || ''; my $file = $helper->{file}; $helper->render_file( 'compclass', $file ); }
1; __DATA__ __compclass__ package [% class %]; use strict; use base 'Catalyst::Model::DBIC::Plain'; my @conn_info = ( '[% dsn %]', '[% user %]', '[% pass %]', { RaiseError => 1, PrintError => 0, ShowErrorStatement => 1, TraceLevel => 0 } ); __PACKAGE__->load_classes; __PACKAGE__->compose_connection( __PACKAGE__, @conn_info );
1;