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 the which view should be used
--controller_base define the which view should be used
--lib_dir points to DBSchema/myapp lib dirs, ie:
--template_file crudgenerator_template.tt2
--output_dir default is local dir (the dir you are in)
~\$ crudgenerator.pl --help
~\$ crudgenerator.pl --db_connect=dbi:Pg:dbname=MyDataBase \\
~\$ --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).