Peter Karman > Rose-DBx-Garden-Catalyst-0.16 > Rose::DBx::Garden::Catalyst



Annotate this POD



Open  0
View/Report Bugs
Module Version: 0.16   Source   Latest Release: Rose-DBx-Garden-Catalyst-0.180


Rose::DBx::Garden::Catalyst - plant Roses in your Catalyst garden


    # create a Catalyst app
    > MyApp
    # create a Rose::DBx::Garden::Catalyst script
    > cat
    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
    # run your script
    > perl
    # edit your file:
    > vi MyApp/lib/
     # serve static assets
     use Catalyst qw/
        'Plugin::Static::Simple::ByClass' => {
            classes => [qw( CatalystX::CRUD::YUI::TT )],
     # after __PACKAGE__->setup();
     # add these lines:
     use MRO::Compat;
     use mro 'c3';
    # start your Catalyst dev server
    > cd MyApp
    > perl script/
    # 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.


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.

plant( path/to/my/catapp )

Override the base method to create Catalyst-related files in addition to the basic Garden files.

make_catalyst( class_names, path )

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>


client-side JS validation

Should be straightforward since the Garden nows puts column-type as xhtml class value.

RDGC tests

Need a way to reliably test the JS.


Known issues:

re-running the script fails to pick up all classes

This is due to issues with @INC and how the RDBO Loader requires classes. There is no known workaround at the moment.

javascript required

The TT templates generated depend heavily on the YUI toolkit Graceful degredation is not implemented as yet.

Please report any bugs or feature requests to bug-rose-dbx-garden-catalyst at, or through the web interface at I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.


You can find documentation for this module with the perldoc command.

    perldoc Rose::DBx::Garden::Catalyst

You can also look for information at:


The Minnesota Supercomputing Institute sponsored the development of this software.


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.

syntax highlighting: