Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Perl
tag: 1.003

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib/Catalyst/View/TT
t
.shipit
Changes
MANIFEST.SKIP
Makefile.PL
README

README

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 MyApp::View::TT/;
    
        1;
    
DESCRIPTION
    This is a very simple sub-class of Catalyst::View::TT, which sets the
    response "Content-Type" to be "application/xhtml+xml" if the user's
    browser sends an "Accept" header indicating that it is willing to
    process that MIME type.

    Changing the "Content-Type" causes browsers to interpret the page as
    strict XHTML, 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 rendered strictly, so any markup errors will show
    up at once.

METHODS
  process
    Overrides the standard process method, delegating to Catalyst::View::TT
    to render the template, and then changing the response "Content-Type" if
    appropriate (from the requests "Accept" header).

BUGS
    There should be a more elegant way to inherit the config of your normal
    TT view.

    Configuration (as loaded by Catalyst::Plugin::ConfigLoader) for the TT
    view is not used.

    No helper to generate the view file needed (just copy the code in the
    SYNOPSIS).

AUTHOR
    Tomas Doran "<bobtfish@bobtfish.net>"

CONTRIBUTORS
    David Dorward - test patches

COPYRIGHT
    This module itself is copyright (c) 2008 Tomas Doran and is licensed
    under the same terms as Perl itself.

Something went wrong with that request. Please try again.