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

Mojolicious::Command::generate::routes_restsful_just_routes - Generate just the perl code for routes from a Mojolicious::Plugin::Routes::Restful HASH

SYNOPSIS

  my $commands = Mojolicious::Commands->new;
  my $gen = Mojolicious::Command::generate::routes_restsful_just_routes->new;
  $gen->run('RoutesRestfulCode',{ 
            CONFIG => { Namespaces => ['RouteRestfulApp::Controller'] },
            PARENT => {...
 

DESCRIPTION

Give Mojolicious::Command::generate::routes_restsful_just_routes a hash that was created for Mojolicious::Plugin::Routes::Restful it will generate the code for the described routes.

It is not intended to use this generator from the command line. Best to use it in a script. See the script dir for an example.

See Mojolicious::Plugin::Routes::Restful for details on how to make a Hash for this generator.

ATTRIBUTES

Mojolicious::Command::generate::app inherits all attributes from Mojolicious::Command and implements the following new ones.

description

  my $description = $app->description;
  $app            = $app->description('Foo');
 

Short description of this command, used for the command list.

usage

  my $usage = $app->usage;
  $app      = $app->usage('Foo');
 

Usage information for this command, used for the help screen.

METHODS

Mojolicious::Command::generate::routes_restsful inherits all methods from Mojolicious::Command and implements the following new ones.

run

  $app->run($name,$hash);
 

Generates the code. Where $name is the name of the file you want to create, and $hash is a valid Mojolicious::Plugin::Routes::Restful hash.

SEE ALSO

Mojolicious, Mojolicious::Guides, http://mojolicious.org, Mojolicious::Plugin::Routes::Restful.

LICENSE AND COPYRIGHT

Copyright 2016 John Scoles. This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License. See http://dev.perl.org/licenses/ for more information.