FAQ

On 29/02/2012, at 12:03 AM, Johannes Kilian wrote:

Hi,

I've got following question concerning views: I want to provide an XML-View which provides "standard" XML-Files using XML::Simple in almost any case. Just in some cases I want to provide specialized XML-Files.

In other words: I want to use XML::Simple as default handler - which is overriden by a specialized XML Generator in some cases ...

Within my controller I do have something like this:
----
__PACKAGE__->config(
'default' => 'text/html',
'stash_key' => 'rest',
'map' => {
'text/html' => [ 'View', 'TT', ],
'text/xml' => [ 'View', 'XML', ],
# 'text/xml' => 'XML::Simple',
}
);
-----

I cannot figure out how to set XML::Simple as default handler and override this for certain URLs within the same controller whilst for other URLs within the same controller the default XML-Handler is used ....

Is this possible at all?
How can I do this?
I'd either use Catalyst::View;:Download::XML, or steal from it to create your own view: https://metacpan.org/module/Catalyst::View::Download::XML

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 4 | next ›
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedFeb 28, '12 at 1:03p
activeFeb 29, '12 at 10:35a
posts4
users4
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase