2 Catalyst::View::TT::XHTML - A sub-class of the standard TT view which
3 serves application/xhtml+xml content if the browser accepts it.
6 package MyApp::View::XHTML;
9 use base qw/Catalyst::View::TT::XHTML MyApp::View::TT/;
14 This is a very simple sub-class of Catalyst::View::TT, which sets the
15 response "Content-Type" to be "application/xhtml+xml" if the user's
16 browser sends an "Accept" header indicating that it is willing to
17 process that MIME type.
19 Changing the "Content-Type" causes browsers to interpret the page as
20 strict XHTML, meaning that the markup must be well formed.
22 This is useful when you're developing your application, as you know that
23 all pages you view are rendered strictly, so any markup errors will show
28 Overrides the standard process method, delegating to Catalyst::View::TT
29 to render the template, and then changing the response "Content-Type" if
30 appropriate (from the requests "Accept" header).
33 There should be a more elegant way to inherit the config of your normal
36 Configuration (as loaded by Catalyst::Plugin::ConfigLoader) for the TT
39 No helper to generate the view file needed (just copy the code in the
43 Tomas Doran "<bobtfish@bobtfish.net>"
46 David Dorward - test patches
49 This module itself is copyright (c) 2008 Tomas Doran and is licensed
50 under the same terms as Perl itself.