| 1 | package Catalyst::View; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 83 | ▶ | use Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 83 | extends qw/Catalyst::Component/; | |||||||||||||||||||
| 5 | |||||||||||||||||||||
| 6 | =head1 NAME | ||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | Catalyst::View - Catalyst View base class | ||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | =head1 SYNOPSIS | ||||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | package Catalyst::View::Homebrew; | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | use base qw/Catalyst::View/; | ||||||||||||||||||||
| 15 | |||||||||||||||||||||
| 16 | sub process { | ||||||||||||||||||||
| 17 | # template processing goes here. | ||||||||||||||||||||
| 18 | } | ||||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | =head1 DESCRIPTION | ||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | This is the Catalyst View base class. It's meant to be used as | ||||||||||||||||||||
| 23 | a base class by Catalyst views. | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | As a convention, views are expected to read template names from | ||||||||||||||||||||
| 26 | $c->stash->{template}, and put the output into $c->res->body. | ||||||||||||||||||||
| 27 | Some views default to render a template named after the dispatched | ||||||||||||||||||||
| 28 | action's private name. (See L<Catalyst::Action>.) | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | =head1 METHODS | ||||||||||||||||||||
| 31 | |||||||||||||||||||||
| 32 | Implements the same methods as other Catalyst components, see | ||||||||||||||||||||
| 33 | L<Catalyst::Component> | ||||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | =head2 process | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | gives an error message about direct use. | ||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | =cut | ||||||||||||||||||||
| 40 | |||||||||||||||||||||
| 41 | 0 | ▶ | sub process { | ||||||||||||||||||
|
Subroutine
process: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | 0 | ▶ | Catalyst::Exception->throw( message => ( ref $_[0] || $_[0] ). | ||||||||||||||||||
|
Condition0%0/3
ref $_[0] || $_[0]
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0]
$_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
| |||||||||||||||||||||
| 44 | " directly inherits from Catalyst::View. You need to\n". | ||||||||||||||||||||
| 45 | " inherit from a subclass like Catalyst::View::TT instead.\n" ); | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | } | ||||||||||||||||||||
| 48 | |||||||||||||||||||||
| 49 | =head1 AUTHORS | ||||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | Catalyst Contributors, see Catalyst.pm | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | =head1 COPYRIGHT | ||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | This library is free software. You can redistribute it and/or modify it under | ||||||||||||||||||||
| 56 | the same terms as Perl itself. | ||||||||||||||||||||
| 57 | |||||||||||||||||||||
| 58 | =cut | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | 83 | ▶ | no Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 61 | 83 | __PACKAGE__->meta->make_immutable(); | |||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | 83 | 1; | |||||||||||||||||||