Ado
view release on metacpan or search on metacpan
lib/Ado/Command/generate/adoplugin.pm view on Meta::CPAN
An instance of L<Ado::Command::generate::crud>.
Used by L<Ado::Command::generate::adoplugin> to generate routes for controllers
and possibly others.
=head2 description
my $description = $command->description;
$command = $command->description('Foo!');
Short description of this command, used for the command list.
=head2 usage
my $usage = $command->usage;
$command = $command->usage('Foo!');
Usage information for this command, used for the help screen.
=head1 METHODS
L<Ado::Command::generate::adoplugin> inherits all methods from
L<Ado::Command> and implements the following new ones.
=head2 run
$plugin->run(@ARGV);
Run this command.
=head1 SEE ALSO
L<Mojolicious::Command::generate::plugin>,
L<Ado::Command::generate::crud>,
L<Ado::Command::generate::apache2vhost>,
L<Ado::Command::generate::apache2htaccess>, L<Ado::Command::generate>,
L<Mojolicious::Command::generate>, L<Getopt::Long>,
L<Ado::Command> L<Ado::Manual>,
L<Mojolicious>, L<Mojolicious::Guides::Cookbook/DEPLOYMENT>
=head1 AUTHOR
ÐÑаÑÐ¸Ð¼Ð¸Ñ ÐеÑов (Krasimir Berov)
=head1 COPYRIGHT AND LICENSE
Copyright 2014 ÐÑаÑÐ¸Ð¼Ð¸Ñ ÐеÑов (Krasimir Berov).
This program is free software, you can redistribute it and/or
modify it under the terms of the
GNU Lesser General Public License v3 (LGPL-3.0).
You may copy, distribute and modify the software provided that
modifications are open source. However, software that includes
the license may release under a different license.
See http://opensource.org/licenses/lgpl-3.0.html for more information.
=cut
__DATA__
@@ class
% my ($class, $name) = @_;
package <%= $class %>;
use Mojo::Base 'Ado::Plugin';
our $VERSION = '0.01';
sub register {
my ($self, $app, $config) = shift->initialise(@_);
# Do your magic here.
# You may want to add some helpers
# or some new complex routes definitions,
# or register this plugin as a template renderer.
# Look in Mojolicious and Ado sources for examples and inspiration.
return $self;
}
1;
<% %>__END__
<% %>=encoding utf8
<% %>=head1 NAME
<%= $class %> - an Ado Plugin that does foooooo.
<% %>=head1 SYNOPSIS
# $ENV{MOJO_HOME}/etc/ado.config
plugins => {
# other plugins here...
'<%= $name %>',
# other plugins here...
}
<% %>=head1 DESCRIPTION
L<<%= $class %>> is an L<Ado> plugin.
<% %>=head1 METHODS
L<<%= $class %>> inherits all methods from
L<Ado::Plugin> and implements the following new ones.
<% %>=head2 register
$plugin->register(Ado->new);
Register plugin in L<Ado> application.
<% %>=head1 SEE ALSO
L<Ado::Plugin>, L<Mojolicious::Guides::Growing>,
L<Ado::Manual>, L<Mojolicious>, L<http://mojolicio.us>.
<% %>=head1 AUTHOR
Your Name
( run in 1.117 second using v1.01-cache-2.11-cpan-140bd7fdf52 )