| Catalyst-Action-Fixup-XHTML documentation | Contained in the Catalyst-Action-Fixup-XHTML distribution. |
Catalyst::Action::Fixup::XHTML - Catalyst action which serves application/xhtml+xml content if the browser accepts it.
sub end : ActionClass('Fixup::XHTML') {}
A simple module to use Catalyst::View::ContentNegotiation::XHTML
It's an action because I think it can be used in other views like Mason.
Since Catalyst doesn't support two ActionClass attributes now, you need do follows to make them together.
sub render : ActionClass('RenderView') { }
sub end : ActionClass('Fixup::XHTML') {
my ( $self, $c ) = @_;
$c->forward('render');
}
Fayland Lam, <fayland at gmail.com>
Tomas Doran for the great Catalyst::View::TT::XHTML
Copyright 2008 Fayland Lam, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Catalyst-Action-Fixup-XHTML documentation | Contained in the Catalyst-Action-Fixup-XHTML distribution. |
package Catalyst::Action::Fixup::XHTML; use Moose; our $VERSION = '0.05'; extends 'Catalyst::Action'; with 'Catalyst::View::ContentNegotiation::XHTML'; use MRO::Compat; sub process {} # Make the role happy. sub execute { my $self = shift; my ($controller, $c ) = @_; my $ret = $self->next::method( @_ ); $self->process($c); return $ret; } 1; __END__