[Catalyst-commits] r11703 - Catalyst-View-TD/trunk/lib/Catalyst/View
theory at dev.catalyst.perl.org
theory at dev.catalyst.perl.org
Sat Oct 31 21:11:30 GMT 2009
Author: theory
Date: 2009-10-31 21:11:29 +0000 (Sat, 31 Oct 2009)
New Revision: 11703
Modified:
Catalyst-View-TD/trunk/lib/Catalyst/View/TD.pm
Log:
Fill out method documentaation a bit. Explain that `strict` is true by default, unlike in Template::Declare.
Modified: Catalyst-View-TD/trunk/lib/Catalyst/View/TD.pm
===================================================================
--- Catalyst-View-TD/trunk/lib/Catalyst/View/TD.pm 2009-10-31 20:56:21 UTC (rev 11702)
+++ Catalyst-View-TD/trunk/lib/Catalyst/View/TD.pm 2009-10-31 21:11:29 UTC (rev 11703)
@@ -256,7 +256,7 @@
use strict;
use parent 'Catalyst::View::TD';
- MyApp::View::TD->config({
+ __PACKAGE__->config({
dispatch_to => [ 'MyApp::TD::HTML' ],
auto_alias => 1,
strict => 1,
@@ -574,13 +574,49 @@
in the C<Users> controller and a corresponding C<list> view in the
C<HTML::Users> view, both would resolve to C</users/list>.
-=head2 Methods
+=head1 Methods
+=head2 Constructor
+
=head3 C<new>
+ my $view = MyApp::View::HTML->new( $c, $args );
+
The constructor for the TD view. Sets up the template provider and reads the
+application config. The C<$args> hash reference, if present, overrides the
application config.
+=head2 Class Methods
+
+=head3 C<config>
+
+ __PACKAGE__->config(
+ dispatch_to => [qw(MyApp::TD::HTML)],
+ auto_alias => 1,
+ strict => 1,
+ postprocessor => sub { ... },
+ around_template => sub { ... },
+ );
+
+Sets up the configuration your view subclass. All the settings are the same as
+for Template::Declare's L<C<init()>|Template::Declare/init> method except:
+
+=over
+
+=item auto_alias
+
+Additional option. Determines whether or not classes found under the dispatch
+template's namespace are automatically aliased as described in
+L</"Auto-Aliasing>.
+
+=item strict
+
+Set to true by default (it's false by default in Template::Declare).
+
+=back
+
+=head2 Instance Methods
+
=head3 C<process>
$view->process($c);
@@ -598,11 +634,6 @@
If C<$args> is a hash reference, it will be passed to the template. Otherwise,
C<< $c->stash >> will be passed if C<$c> is defined.
-=head3 C<config>
-
-This method allows your view subclass to pass additional settings to the TD
-configuration hash, or to set the options as below:
-
=head1 SEE ALSO
L<Catalyst>, L<Catalyst::View::TT>, L<Catalyst::Helper::View::TD>,
More information about the Catalyst-commits
mailing list