File: Plugin.pm

package info (click to toggle)
libmojolicious-perl 0.999926-1%2Bsqueeze2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,672 kB
  • ctags: 949
  • sloc: perl: 17,391; makefile: 4
file content (48 lines) | stat: -rw-r--r-- 1,045 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Copyright (C) 2008-2010, Sebastian Riedel.

package Mojolicious::Plugin;

use strict;
use warnings;

use base 'Mojo::Base';

# This is Fry's decision.
# And he made it wrong, so it's time for us to interfere in his life.
sub register { }

1;
__END__

=head1 NAME

Mojolicious::Plugin - Plugin Base Class

=head1 SYNOPSIS

    use base 'Mojolicious::Plugin';

=head1 DESCRIPTION

L<Mojolicous::Plugin> is an abstract base class for L<Mojolicious> plugins.
See L<Mojolicious::Plugins> for more information.

=head1 METHODS

L<Mojolicious::Plugin> inherits all methods from L<Mojo::Base> and implements
the following new ones.

=head2 C<register>

    $plugin->register;
    
This method will be called by L<Mojolicious::Plugins> at startup time,
your plugin should use this to hook into the application.
For instace by adding handlers and helpers to the renderer or using the
C<add_hooks> method of L<Mojolicious::Plugins> to hook into the request flow.

=head1 SEE ALSO

L<Mojolicious>, L<Mojolicious::Guides>, L<http://mojolicious.org>.

=cut