• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

lib/Catalyst/H13-Dec-2006-454181

t/H13-Dec-2006-2113

Build.PLH A D03-Dec-2006579 2117

ChangesH A D13-Dec-20061.2 KiB5235

MANIFESTH A D21-Jul-2006219 1211

META.ymlH A D13-Dec-2006711 2524

Makefile.PLH A D13-Dec-2006591 1715

READMEH A D13-Dec-20063.4 KiB10274

README

1NAME
2    Catalyst::View::HTML::Template::Compiled - HTML::Template::Compiled View
3    Class
4
5SYNOPSIS
6        # use the helper
7        script/myapp_create.pl view HTML::Template::Compiled HTML::Template::Compiled
8
9        # lib/MyApp/View/HTML/Template.pm
10        package MyApp::View::HTML::Template::Compiled;
11
12        use base 'Catalyst::View::HTML::Template::Compiled';
13
14        __PACKAGE__->config(
15            use_default_path => 0, # defaults to 1
16
17            # any HTML::Template::Compiled configurations items go here
18            # see HTML::Template::Compiled documentation for more details
19        );
20
21        1;
22
23        # Meanwhile, maybe in an 'end' action
24        $c->forward('MyApp::View::HTML::Template::Compiled');
25
26DESCRIPTION
27    This is the " HTML::Template::Compiled " view class. Your subclass
28    should inherit from this class.
29
30METHODS
31    new Internally used by "Catalyst". Used to configure some internal
32        stuff.
33
34    process
35        Renders the template specified in * $c-*stash->{template} >, *
36        $c-*request->match >, * $c-*config->{template}->{filename} > or *
37        __PACKAGE__-*config->{filename} >.
38
39        Template params are set up from the contents of * $c-*stash >,
40        augmented with " base " set to * $c-*req->base >, * name * to *
41        $c-*config->{name} > and * c * to * $c *. Output is stored in *
42        $c-*response->body >.
43
44    prepare_process
45        Pretty much the first thing called by * process *. Only used for
46        sub-classing. Return a i<true>-value if everything is okay,
47        otherwise * process * will fail.
48
49    finalize_process
50        Will be called right before * process * finishes. Only used for
51        sub-classing. Whatever it returns, * process * will return.
52
53    prepare_htc
54        Creates the " HTML::Template::Compiled " object. On success, returns
55        the filename to be rendered; undef otherwise.
56
57    htc Accessor to the "HTML::Template::Compiled" object. May returns undef
58        then the object has not yet been created or creating has failed.
59
60    prepare_render
61        First thing before " render " is called. Assigns the parameters like
62        the ones from the stash.
63
64    render
65        This is where the rendering magic happens. Returns the rendered
66        output on success, or undef otherwise.
67
68    template
69        Tries to find the right template to render. Returns its filename or
70        undef. Actually only used internally.
71
72    path
73        Returns a array ref with paths used to find the templates in.
74
75    config
76        "use_default_path": if set, will include *$c->config->{root}* and
77        *$c->config->{root} . '/base'* to look for the template. *Defaults
78        to 1*.
79
80        This also allows your view subclass to pass additional settings to
81        the "HTML::Template::Compiled" config hash.
82
83    config_names
84        A list of names that are used to locate configuration parameters for
85        the view inside " $c-"config >.
86
87    catalyst
88        Normally all methods are called with the * $c * as the first
89        parameter. Just to insure that you have it as a method it case you
90        need it. :) Will be initializes by " new ".
91
92SEE ALSO
93    HTML::Template::Compiled, Catalyst, Catalyst::Base.
94
95AUTHOR
96    Sascha Kiefer, "esskar@cpan.org"
97
98COPYRIGHT
99    This program is free software, you can redistribute it and/or modify it
100    under the same terms as Perl itself.
101
102