| 1 | package Yukki::Web::Controller; | ||
| 2 | 1 | $Yukki::Web::Controller::VERSION = '0.991_002'; # TRIAL | |
| 3 | |||
| 4 | 1 | ▶ | $Yukki::Web::Controller::VERSION = '0.991002';use v5.24; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 1 | ▶ | use utf8; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 6 | 1 | ▶ | use Moo::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 7 | |||
| 8 | 1 | ▶ | use Type::Utils; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 9 | |||
| 10 | 1 | ▶ | use namespace::clean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | # ABSTRACT: Base class for Yukki::Web controllers | ||
| 13 | |||
| 14 | |||
| 15 | 1 | has app => ( | |
| 16 | is => 'ro', | ||
| 17 | isa => class_type('Yukki::Web'), | ||
| 18 | required => 1, | ||
| 19 | weak_ref => 1, | ||
| 20 | handles => 'Yukki::Role::App', | ||
| 21 | ); | ||
| 22 | |||
| 23 | |||
| 24 | 1 | requires 'fire'; | |
| 25 | |||
| 26 | 1 | 1; | |
| 27 | |||
| 28 | __END__ | ||
| 29 | |||
| 30 | =pod | ||
| 31 | |||
| 32 | =encoding UTF-8 | ||
| 33 | |||
| 34 | =head1 NAME | ||
| 35 | |||
| 36 | Yukki::Web::Controller - Base class for Yukki::Web controllers | ||
| 37 | |||
| 38 | =head1 VERSION | ||
| 39 | |||
| 40 | version 0.991_002 | ||
| 41 | |||
| 42 | =head1 DESCRIPTION | ||
| 43 | |||
| 44 | All L<Yukki::Web> controllers extend from here. | ||
| 45 | |||
| 46 | =head1 ATTRIBUTES | ||
| 47 | |||
| 48 | =head2 app | ||
| 49 | |||
| 50 | This is the L<Yukki::Web> application. | ||
| 51 | |||
| 52 | =head1 REQUIRED METHODS | ||
| 53 | |||
| 54 | =head2 fire | ||
| 55 | |||
| 56 | $controller->fire($context); | ||
| 57 | |||
| 58 | Controllers must implement this method. This method will be given a | ||
| 59 | L<Yukki::Web::Context> to work with. It is expected to fill in the | ||
| 60 | L<Yukki::Web::Response> attached to that context or throw an exception. | ||
| 61 | |||
| 62 | =head1 AUTHOR | ||
| 63 | |||
| 64 | Andrew Sterling Hanenkamp <hanenkamp@cpan.org> | ||
| 65 | |||
| 66 | =head1 COPYRIGHT AND LICENSE | ||
| 67 | |||
| 68 | This software is copyright (c) 2017 by Qubling Software LLC. | ||
| 69 | |||
| 70 | This is free software; you can redistribute it and/or modify it under | ||
| 71 | the same terms as the Perl 5 programming language system itself. | ||
| 72 | |||
| 73 | =cut | ||