s/Class::C3/MRO::Compat/
[catagits/Catalyst-View-ContentNegotiation-XHTML.git] / README
CommitLineData
06cf3efb 1NAME
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.
4
5SYNOPSIS
6 package MyApp::View::XHTML;
7 use strict;
8 use warnings;
9 use base qw/Catalyst::View::TT::XHTML MyApp::View::TT/;
10
11 1;
12
13DESCRIPTION
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.
0f9bcf09 18
06cf3efb 19 Changing the "Content-Type" causes browsers to interpret the page as
20 strict XHTML, meaning that the markup must be well formed.
0f9bcf09 21
06cf3efb 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
24 up at once.
0f9bcf09 25
06cf3efb 26METHODS
27 process
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).
0f9bcf09 31
06cf3efb 32BUGS
33 There should be a more elegant way to inherit the config of your normal
34 TT view.
0f9bcf09 35
06cf3efb 36 Configuration (as loaded by Catalyst::Plugin::ConfigLoader) for the TT
37 view is not used.
0f9bcf09 38
06cf3efb 39 No helper to generate the view file needed (just copy the code in the
40 SYNOPSIS).
0f9bcf09 41
06cf3efb 42AUTHOR
43 Tomas Doran "<bobtfish@bobtfish.net>"
44
45CONTRIBUTORS
46 David Dorward - test patches
0f9bcf09 47
06cf3efb 48COPYRIGHT
49 This module itself is copyright (c) 2008 Tomas Doran and is licensed
50 under the same terms as Perl itself.
0f9bcf09 51