1 package Catalyst::View::TT::XHTML;
4 use namespace::clean -except => 'meta';
6 extends qw/Catalyst::View::TT/;
7 with qw/Catalyst::View::ContentNegotiation::XHTML/;
9 our $VERSION = '1.100';
17 Catalyst::View::TT::XHTML - A sub-class of the standard TT view which
18 serves application/xhtml+xml content if the browser accepts it.
22 package MyApp::View::XHTML;
25 use base qw/Catalyst::View::TT::XHTML/;
31 This is a very simple sub-class of L<Catalyst::View::TT>, which sets
32 the response C<Content-Type> to be C<application/xhtml+xml> if the
33 user's browser sends an C<Accept> header indicating that it is willing
34 to process that MIME type.
36 Changing the C<Content-Type> causes browsers to interpret the page as
37 XML, meaning that the markup must be well formed.
39 This is useful when you're developing your application, as you know that
40 all pages you view are parsed as XML, so any errors caused by your markup
41 not being well-formed will show up at once.
45 This module is a very simple demonstration of a consumer of the
46 L<Catalyst::View::ContentNegotiation::XHTML> role.
48 If your needs are not trivial, then it is recommended that you consume
53 Tomas Doran (t0m) C<< <bobtfish@bobtfish.net> >>
57 This module itself is copyright (c) 2008 Tomas Doran and is licensed under the same terms as Perl itself.