diff options
Diffstat (limited to 'lib/CGI/Application/Plugin/AnyTemplate/Base.pm')
-rwxr-xr-x | lib/CGI/Application/Plugin/AnyTemplate/Base.pm | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/lib/CGI/Application/Plugin/AnyTemplate/Base.pm b/lib/CGI/Application/Plugin/AnyTemplate/Base.pm index 0cd569c..cae20cd 100755 --- a/lib/CGI/Application/Plugin/AnyTemplate/Base.pm +++ b/lib/CGI/Application/Plugin/AnyTemplate/Base.pm @@ -154,7 +154,10 @@ hook is called. Any callbacks that you register to this hook will be called before each template is processed. Register a C<template_pre_process> callback as follows: - $self->add_callback('template_pre_process', \&my_tmpl_pre_process); + $self->add_callback( + 'template_pre_process', + \&my_tmpl_pre_process + ); Pre-process callbacks will be passed a reference to the C<$template> object, and can can modify the parameters passed into the template by @@ -179,7 +182,9 @@ using the C<param> method: After the template output is generated, the C<template_post_process> hook is called. You can register a C<template_post_process> callback as follows: - $self->add_callback('template_post_process', \&my_tmpl_post_process); + $self->add_callback('template_post_process', + \&my_tmpl_post_process + ); Any callbacks that you register to this hook will be called after each template is processed, and will be passed both a reference to the @@ -287,14 +292,16 @@ driver-specific subclass of C<CGI::Application::Plugin::AnyTemplate> This is a virtual method and must be defined in the subclass. -The following paramters are passed to the driver and available as keys of the +The following parameters are passed to the driver and available as keys of the driver's C<$self> object: 'driver_config' => ... # hashref of driver-specific config - 'native_config' => ... # hashref of native template system specific config + 'native_config' => ... # hashref of native template system + # specific config 'include_paths' => ... # listref of template include paths 'filename' => ... # template filename - 'webapp' => ... # reference to the current CGI::Application $self + 'webapp' => ... # reference to the current + # CGI::Application $self =cut @@ -370,7 +377,7 @@ sub default_driver_config { =item render_template -This method must be overriden in a subclass. It has the responsibility +This method must be overridden in a subclass. It has the responsibility of filling the template in C<< $self->filename >> with the values in C<< $self->param >> via the appropriate template system, and returning the output as either a string or a reference to a string. |