Mojolicious::Command::Generate::Hypnotoad - Hypnotoad Generator Command


Mojolicious documentation Contained in the Mojolicious distribution.

Index


Code Index:

NAME

Top

Mojolicious::Command::Generate::Hypnotoad - Hypnotoad Generator Command

SYNOPSIS

Top

  use Mojolicious::Command::Generate::Hypnotoad;

  my $hypnotoad = Mojolicious::Command::Generate::Hypnotoad->new;
  $hypnotoad->run(@ARGV);

DESCRIPTION

Top

Mojolicious::Command::Generate::Hypnotoad is a hypnotoad.conf generator.

ATTRIBUTES

Top

Mojolicious::Command::Generate::Hypnotoad inherits all attributes from Mojo::Command and implements the following new ones.

description

  my $description = $hypnotoad->description;
  $hypnotoad      = $hypnotoad->description('Foo!');

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

usage

  my $usage  = $hypnotoad->usage;
  $hypnotoad = $hypnotoad->usage('Foo!');

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

METHODS

Top

Mojolicious::Command::Generate::Hypnotoad inherits all methods from Mojo::Command and implements the following new ones.

run

  $hypnotoad = $hypnotoad->run(@ARGV);

Run this command.

SEE ALSO

Top

Mojolicious, Mojolicious::Guides, http://mojolicio.us.


Mojolicious documentation Contained in the Mojolicious distribution.

package Mojolicious::Command::Generate::Hypnotoad;
use Mojo::Base 'Mojo::Command';

has description => <<'EOF';
Generate "hypnotoad.conf".
EOF
has usage => <<"EOF";
usage: $0 generate hypnotoad
EOF

# "Oh no! Can we switch back using four or more bodies?
#  I'm not sure. I'm afraid we need to use... MATH."
sub run {
  my $self = shift;
  $self->render_to_rel_file('hypnotoad', 'hypnotoad.conf');
  $self->chmod_file('hypnotoad.conf', 0644);
}

1;
__DATA__
@@ hypnotoad
# See "perldoc Mojo::Server::Hypnotoad" for a full list of options
{
  listen  => ['http://*:8080'],
  workers => 4
};
__END__