App::mkfeyorm - Make skeleton code with Fey::ORM
version 0.010
use App::mkfeyorm; my $app = App::mkfeyorm->new( output_path => 'somewhere/lib', schema => 'Schema', tables => [qw( MC::User MC::Role MC::UserRole AE::Source AE::Task CM::Source CM::Task )], namespace => 'MedicalCoding', table_namespace => 'Model', ); $app->process;
This module generates Fey::ORM based module on the fly. At least schema and tables attributes are needed.
schema
tables
Schema module name (required)
my $schema_module_name = $self->schema; $self->set_schema($schema_module_name);
Table module name list (required)
my $table_module_names_ref = $self->tables; $self->set_tables(\@table_module_names); $self->set_tables(\%table_module_names);
Output path for generated modules. Default output directory is lib.
lib
my $output_path = $self->output_path; $self->set_output_path($output_path);
Namespace for schema and table module
Namespace for table module
Namespace for schema module
Schema template string. If you want to use your own template file then use this attribute.
Table template string. If you want to use your own template file then use this attribute.
Use cache feature or not. Default is false. It uses Storable to save and load cache file.
Hash reference for templating. Set this attribute if you want to use additional parameters in your own templates.
Generate the schema module & table module
my $app = App::mkfeyorm->new( schema => 'Schema', tables => { User => 'user', Role => 'role', UserRole => 'user_role', }, namespace => 'Web::Blog', table_namespace => 'Model', ); $app->process;
Generate the schema module.
$app->process_schema;
Generate the talbe module.
$app->process_table;
Generate the table module.
$app->process_tables; # generates all tables $app->process_tables(qw/ User Role /); # generates User and Role tables
Get full name of schema module
Get full names of table modules
Get module path from module names
Fey::ORM
Keedi Kim - 김도형 <keedi@cpan.org>
This software is copyright (c) 2011 by Keedi Kim.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install App::mkfeyorm, copy and paste the appropriate command in to your terminal.
cpanm
cpanm App::mkfeyorm
CPAN shell
perl -MCPAN -e shell install App::mkfeyorm
For more information on module installation, please visit the detailed CPAN module installation guide.