| Catalyst::Plugin::Bread::Board::Container - A Bread::Board container for use with Catalyst |
Catalyst::Plugin::Bread::Board::Container - A Bread::Board container for use with Catalyst
package My::App::Container; use Moose; use Bread::Board;
extends 'Catalyst::Plugin::Bread::Board::Container';
sub BUILD { my $self = shift;
container $self => as {
container 'Model' => as {
container 'DBIC' => as {
service 'schema_class' => 'Test::App::Schema::DB';
service 'connect_info' => [
'dbi:mysql:my_app_db',
'me',
'****'
];
};
};
container 'View' => as {
container 'TT' => as {
service 'TEMPLATE_EXTENSION' => '.tt';
service 'INCLUDE_PATH' => (
block => sub {
my $root = (shift)->param('app_root');
[ $root->subdir('root/templates')->stringify ]
},
dependencies => [ depends_on('/app_root') ]
);
};
};
};
}
This is a subclass of the Bread::Board::Container manpage that is meant to be used with the Catalyst::Plugin::Bread::Board manpage. For now this is pretty simple, but soon it will have more features.
All complex software has bugs lurking in it, and this module is no exception. If you find a bug please either email me, or add the bug to cpan-RT.
Stevan Little <stevan.little@iinteractive.com>
Copyright 2010 Infinity Interactive, Inc.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Catalyst::Plugin::Bread::Board::Container - A Bread::Board container for use with Catalyst |