Mojolicious::Command::scaffold - Scaffold command
Usage: APPLICATION scaffold [OPTIONS] ./myapp.pl scaffold ./myapp.pl scaffold controller Options: 'base|b:s', 'controller', 'name=s', 'pretend', 'preview', 'routes', 'table=s', 'template', 'tests', -b, --base <string> Base controller --name <string> Name of the controller, command that you are trying to create --action <string> Default action name for controller --pretent When it's present, the command will just output the content of the files that are about to be created --preview When it's present, a confirmation message will appear before saving a file --create Tells if you are creating/altering a table --table <string> The name of the table --rollback Will create the UP and DOWN version of the migration --tests Will create tests --template Will create a template
Mojolicious::Command::scaffold helps you easily create commands, controllers, migrations, routes, tasks and templates
See "COMMANDS" in Mojolicious::Commands for a list of commands that are available by default.
Mojolicious::Command::scaffold inherits all attributes from Mojo::Console and implements the following new ones.
my $description = $scaffold->description; $scaffold = $scaffold->description('Foo');
my $options = $scaffold->options; $scaffold = $scaffold->options({ action => 'action', base => 'Base::Class' create => 1, # 0 name => 'My::Name' pretend => 0, # 1 preview => 1, # 0 rollback => 1, # 0 routes => 1, # 0 table => 'some_table_name`, template => 1, # 0 tests => 1, # 0 });
A list of options used by scaffold command to decide what needs creating.
my $piling = $scaffold->piling; $scaffold = $scaffold->piling({ ... });
A list of options used by scaffold command to decide how to create things.
my $usage = $scaffold->usage; $scaffold = $scaffold->usage('Foo');
Usage information for this command, used for the help screen.
Mojolicious::Command::scaffold inherits all methods from Mojo::Console and implements the following new ones.
$scaffold->command(@ARGV);
Scaffold a mojolicious command
$scaffold->controller(@ARGV);
Scaffold a mojolicious controller
$scaffold->migration(@ARGV);
Scaffold a migration
$scaffold->process($path, $file, $content);
Process content for a file
$scaffold->routes(@ARGV);
Scaffold a mojolicious routes file
$scaffold->run(@ARGV);
Run scaffold command.
$scaffold->stub($filename, $replacements);
Open stub file and replace things
$scaffold->task(@ARGV);
Scaffold a mojolicious task file
$scaffold->template(@ARGV);
Scaffold a mojolicious template file
Mojo::Console, DB::SQL::Migrations::Advanced, Mojolicious, Mojolicious::Guides, https://mojolicious.org.
To install Mojolicious::Command::scaffold, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Mojolicious::Command::scaffold
CPAN shell
perl -MCPAN -e shell install Mojolicious::Command::scaffold
For more information on module installation, please visit the detailed CPAN module installation guide.