The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

CatalystX::CrudGenerator - output crud (controller+templates) from schema input**BETA

SYNOPSIS

-------------------- Argument descriptions ---------------------

--db_connect          expects db connection string:
                      ie. dbi:Pg:dbname=MyDataBase
                      ie. dbi:SQLite:/databases/myDataBase.db
--db_user             expects a db username       
--db_pass             expects a db password       
--models              one or more model separated by comma
--schema              the schema name
--rows_limit          limit sql query rows on listing
--current_view        define which view should be used
--controller_base     set controller base,ie...Controller::Base
--lib_dir             points to DBSchema/myapp lib dirs, ie:
                      /sites/MyAPP/lib   
--template_file       crudgenerator_template.tt2
--output_dir          default is local dir (the dir you are in)
--app_name            application name ie. MyAPP::Name::Cool

~\$ crudgenerator.pl --help

~\$  crudgenerator.pl 
~\$    --app_name=MyAPP::Name::Cool \                  #REQUIRED
~\$    --db_connect=dbi:Pg:dbname=MyDataBase \         #REQUIRED
~\$    --db_user=joe \                                 #OPTIONAL
~\$    --db_pass=mypass \                              #OPTIONAL
~\$    --models=User,Client,Product \                  #REQUIRED
~\$    --schema=DB \                                   #REQUIRED 
~\$    --rows_limit=15 \                               #OPTIONAL
~\$    --current_view=WebsiteStandardView \            #REQUIRED
~\$    --controller_base=Website::Public \             #REQUIRED
~\$    --lib_dir=/websites/catalyst/MyAPP/lib \        #REQUIRED
~\$    --template_file=crudgenerator_template.tt2 \    #OPTIONAL
~\$    --output_dir=.                                  #OPTIONAL

to preview: http://localhost:3000/crud/* 

DESCRIPTION

CatalystX::CrudGenerator will attempt to generate crud,
template & controllers for your model.

The ideal for CatalystX::CrudGenerator:
  - Be simple, meaning: just output me a Controller.pm
  - Allow custom template, skin sharing, templates with js widgets etc.
  - Generate me a Controller.pm i can use and check out the results.
Note: The standard template works best with blueprint css. 

*OBS* There is some work todo. I dont think its ready for your project out-of-the-box yet.
Expect changes for this early version for CatalystX::CrudGenerator
it needs some template changes. However this version might inspire your
crud generation needs.

TEMPLATES

You can use / modify the default template. its located in:

    lib/CatalystX/template/crudgenerator_template.tt2

Copy and modify it for custom generation. 
Then use "crudgenerator.pl --template_file.."

AUTHOR

Hernan Lopes
CPAN ID: HERNAN
HERNAN
hernanlopes@gmail.com
-

COPYRIGHT

This program is free software licensed under the...

The BSD License

The full text of the license can be found in the LICENSE file included with this module.

SEE ALSO

perl(1).