-
-
20 Nov 2009 11:52:44 UTC
- Distribution: Catalyst-View-ContentNegotiation-XHTML
- Module version: 1.103
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Clone repository
- Issues
- Testers (471 / 14 / 0)
- Kwalitee
Bus factor: 0- 50.00% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (27.4KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
- Dependencies
- Catalyst::Runtime
- Catalyst::View::TT
- HTTP::Negotiate
- MRO::Compat
- MooseX::Types::Moose
- MooseX::Types::Structured
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Catalyst::View::TT::XHTML - A sub-class of the standard TT view which serves application/xhtml+xml content if the browser accepts it.
SYNOPSIS
package MyApp::View::XHTML; use strict; use warnings; use base qw/Catalyst::View::TT::XHTML/; 1;
DESCRIPTION
This is a very simple sub-class of Catalyst::View::TT, which sets the response
Content-Type
to beapplication/xhtml+xml
if the user's browser sends anAccept
header indicating that it is willing to process that MIME type.Changing the
Content-Type
causes browsers to interpret the page as XML, meaning that the markup must be well formed.This is useful when you're developing your application, as you know that all pages you view are parsed as XML, so any errors caused by your markup not being well-formed will show up at once.
NOTE
This module is a very simple demonstration of a consumer of the Catalyst::View::ContentNegotiation::XHTML role.
If your needs are not trivial, or you are not using TT, then using this view is discouraged and deprecated. It is highly recommended that you consume the Catalyst::View::ContentNegotiation::XHTML role yourself, rather than doing silly things with multiple inheritance to use this view in combination with another one.
AUTHOR
Original author and maintainer - Tomas Doran (t0m)
<bobtfish@bobtfish.net>
Now mostly the work of other, smarter people - see Catalyst::View::ContentNegotiation::XHTML.
COPYRIGHT
This module itself is copyright (c) 2008 Tomas Doran and is licensed under the same terms as Perl itself.
Module Install Instructions
To install Catalyst::View::ContentNegotiation::XHTML, copy and paste the appropriate command in to your terminal.
cpanm Catalyst::View::ContentNegotiation::XHTML
perl -MCPAN -e shell install Catalyst::View::ContentNegotiation::XHTML
For more information on module installation, please visit the detailed CPAN module installation guide.