Catalyst::View::REST::XML - (DEPRECATED) XML View Class


Catalyst-View-REST-XML documentation Contained in the Catalyst-View-REST-XML distribution.

Index


Code Index:

NAME

Top

Catalyst::View::REST::XML - (DEPRECATED) XML View Class

SYNOPSIS

Top

    # lib/MyApp/View/REST.pm
    package MyApp::View::REST;

    use base 'Catalyst::View::REST::XML';

    1;

    $c->forward('MyApp::View::REST');

DEPRECATION NOTICE

Top

This module has been deprecated in favor of Catalyst::Action::REST.

DESCRIPTION

Top

This is the XML::Simple view class.

OVERLOADED METHODS

process

Serializes $c->stash to $c->response->output.

SEE ALSO

Top

Catalyst.

AUTHOR

Top

Sebastian Riedel, sri@cpan.org

COPYRIGHT

Top


Catalyst-View-REST-XML documentation Contained in the Catalyst-View-REST-XML distribution.
package Catalyst::View::REST::XML;

use strict;
use base 'Catalyst::View';
use XML::Simple;

our $VERSION = '0.02';

sub process {
    my ( $self, $c ) = @_;
    $c->response->headers->content_type('text/xml');
    $c->response->output( XMLout $c->stash, RootName => 'response' );
    return 1;
}

1;