Rose::DBx::Garden::Catalyst - plant Roses in your Catalyst garden
# create a Catalyst app > catalyst.pl MyApp # create a Rose::DBx::Garden::Catalyst script > cat mk_cat_garden.pl use Rose::DBx::Garden::Catalyst; use MyDB; # isa Rose::DB my $garden = Rose::DBx::Garden::Catalyst->new( catalyst_prefix => 'MyApp', controller_prefix => 'RDGC', garden_prefix => 'MyRDBO', db => MyDB->new, tt => 1, # make Template Toolkit files ); $garden->plant('MyApp/lib'); # run your script > perl mk_cat_garden.pl # edit your MyApp.pm file: > vi MyApp/lib/MyApp.pm # serve static assets use Catalyst qw/ Static::Simple::ByClass /; __PACKAGE__->config( 'Plugin::Static::Simple::ByClass' => { classes => [qw( CatalystX::CRUD::YUI::TT )], } 'default_view' => 'RDGC', ); # after __PACKAGE__->setup(); # add these lines: use MRO::Compat; use mro 'c3'; Class::C3::initialize(); # start your Catalyst dev server > cd MyApp > perl script/myapp_server.pl # enjoy the fruits at http://localhost:3000/rdgc
Rose::DBx::Garden::Catalyst extends Rose::DBx::Garden to create Catalyst component scaffolding. These created components use the RDBO and RHTMLO classes that the Garden class produces. The base Controller, Model and View classes are simple subclasses of CatalystX::CRUD::YUI.
This module works on the assumption that 1 table == 1 form == 1 controller class == 1 model class.
By default this class creates stub Template Toolkit files for use with the RDBO and RHTMLO CRUD components. If you use a different templating system, just set the tt option to 0.
tt
Only new or overridden methods are documented here.
The namespace where Catalyst Controllers are created. Will also be lowercased and serve as the URI path namespace for all RDGC actions.
Default: RDGC
Override the base method to create methods useful to RDBO classes used in Catalyst.
Custom base Form code to implement features that template will require.
Defaults to 'MyApp'.
Returns controller_prefix() transformed to a file path.
Override the base method to create Catalyst-related files in addition to the basic Garden files.
Does the actual file creation of Catalyst files. Called by plant().
class_names should be a hash ref of RDBO => RHTMLO class names, as returned by Rose::DBx::Garden->plant(). If you have existing RDBO and RHTMLO classes that have namespaces inconsistent with the conventions in Rose::DBx::Garden, they should still work. Just map the RDBO => RHTMLO classes in your class_names hash ref.
Peter Karman, <karman at cpan.org>
<karman at cpan.org>
Should be straightforward since the Garden nows puts column-type as xhtml class value.
Need a way to reliably test the JS.
Known issues:
This is due to issues with @INC and how the RDBO Loader requires classes. There is no known workaround at the moment.
The TT templates generated depend heavily on the YUI toolkit http://developer.yahoo.com/yui/. Graceful degredation is not implemented as yet.
http://developer.yahoo.com/yui/
Please report any bugs or feature requests to bug-rose-dbx-garden-catalyst at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Rose-DBx-Garden-Catalyst. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-rose-dbx-garden-catalyst at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Rose::DBx::Garden::Catalyst
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Rose-DBx-Garden-Catalyst
CPAN Ratings
http://cpanratings.perl.org/d/Rose-DBx-Garden-Catalyst
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Rose-DBx-Garden-Catalyst
Search CPAN
http://search.cpan.org/dist/Rose-DBx-Garden-Catalyst
The Minnesota Supercomputing Institute http://www.msi.umn.edu/ sponsored the development of this software.
http://www.msi.umn.edu/
Copyright 2008 by the Regents of the University of Minnesota.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Rose::DBx::Garden::Catalyst, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rose::DBx::Garden::Catalyst
CPAN shell
perl -MCPAN -e shell install Rose::DBx::Garden::Catalyst
For more information on module installation, please visit the detailed CPAN module installation guide.