The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Mojolicious::Command::Author::generate::role - Role generator command

VERSION

version 0.002

SYNOPSIS

  Usage: APPLICATION generate role [OPTIONS] [[CONSUMER_CLASS] NAME]

    mojo generate role
    mojo generate role MyRole
    mojo generate role Mojo::Whatever MyRole
    mojo generate role Mojo::Whatever::Role::MyRole
    mojo generate role -f Mojo::Whatever MyRole

  Options:
    -f, --full   NAME is the full role name (omit 'CONSUMER_CLASS::Role::')
    -h, --help   Show this summary of available options

DESCRIPTION

Mojolicious::Command::Author::generate::role generates directory structures for fully functional roles to use with Mojolicious objects/classes.

If the intended consumer class is not specified it will be inferred from the role name given (whatever precedes ::Role:: in the name) or otherwise default to Mojo::Base.

ATTRIBUTES

Mojolicious::Command::Author::generate::role inherits all attributes from Mojolicious::Command and implements the following new ones:

description

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

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

usage

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

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

METHODS

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

run

  $role_cmd->run(@ARGV);

Run this command.

COPYRIGHT AND LICENSE

Copyright (C) 2019, Roger Crew.

This program is free software, you can redistribute it and/or modify it under the terms of the Artistic License version 2.0.

SEE ALSO

Mojolicious, Mojolicious::Guides, https://mojolicious.org.