From: Tomas Doran (t0m) Date: Mon, 25 May 2009 18:08:24 +0000 (+0100) Subject: More template pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalystX-DynamicComponent.git;a=commitdiff_plain;h=7299c4b9f54d4e06ee4974d6e89ec06bbf472636 More template pod --- diff --git a/lib/CatalystX/DynamicComponent/ModelToControllerReflector.pm b/lib/CatalystX/DynamicComponent/ModelToControllerReflector.pm index f677e2c..64da97f 100644 --- a/lib/CatalystX/DynamicComponent/ModelToControllerReflector.pm +++ b/lib/CatalystX/DynamicComponent/ModelToControllerReflector.pm @@ -74,3 +74,32 @@ sub generate_reflected_controller_action_method { 1; +__END__ + +=head1 NAME + +CatalystX::DynamicComponent::ModelToControllerReflector - Generate Catalyst controllers automaticall from models and configuration. + +=head1 SYNOPSIS + +=head1 DESCRIPTION + +=head1 LINKS + +L, L, L. + +=head1 BUGS + +Probably plenty, test suite certainly isn't comprehensive.. Patches welcome. + +=head1 AUTHOR + +Tomas Doran (t0m) + +=head1 LICENSE + +This code is copyright (c) 2009 Tomas Doran. This code is licensed on the same terms as perl +itself. + +=cut + diff --git a/lib/CatalystX/DynamicComponent/ModelsFromConfig/InterfaceRoles.pm b/lib/CatalystX/DynamicComponent/ModelsFromConfig/InterfaceRoles.pm index 3db3d44..48e329d 100644 --- a/lib/CatalystX/DynamicComponent/ModelsFromConfig/InterfaceRoles.pm +++ b/lib/CatalystX/DynamicComponent/ModelsFromConfig/InterfaceRoles.pm @@ -38,3 +38,55 @@ around '_setup_dynamic_model' => sub { 1; +__END__ + +=head1 NAME + +CatalystX::DynamicComponent::ModelsFromConfig::InterfaceRoles - Generate simple L like models from application config, enforcing roles on the model classes. + +=head1 SYNOPSIS + + package MyApp; + use Moose; + use namespace::autoclean; + use Catalyst qw/ + +CatalystX::DynamicComponent::ModelsFromConfig::InterfaceRoles + /; + __PACKAGE__->config( + name => __PACKAGE__, + 'CatalystX::DynamicComponent::ModelsFromConfig' => { + include => 'One^', + }, + 'Model::One' => { + class => 'SomeClass', # Name of class to load and construct + other => 'config', # Constructor passed other parameters + interface_roles => [qw/ My::Role /], # Your app explodes if SomeClass doesn't do My::Role + }, + ... + ); + __PACKAGE__->setup; + + +=head1 DESCRIPTION + +FIXME + +=head1 LINKS + +L, L, L. + +=head1 BUGS + +Probably plenty, test suite certainly isn't comprehensive.. Patches welcome. + +=head1 AUTHOR + +Tomas Doran (t0m) + +=head1 LICENSE + +This code is copyright (c) 2009 Tomas Doran. This code is licensed on the same terms as perl +itself. + +=cut +