Octavian Rasnita wrote:
> I think there should be a more elegant solution.
You should probably have a CSV view which sets the headers properly.
Forward to the CSV view for CSV, or the HTML view for HTML.
In one of my applications, I have YAML, JSON, HTML, and Atom as possible
output formats. My controller code is the same for each of the formats;
the View is where I do the view-specific work. (That's the idea behind
MVC, after all.)
Regards,
Jonathan Rockway
--
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
_______________________________________________
List: [email protected]
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/