[Catalyst-dev] RFC: Catalyst::View::CSV

Jonathan Rockway jon at jrock.us
Mon Mar 3 18:10:05 GMT 2008


* On Mon, Mar 03 2008, Travis Chase wrote:
> I have written a module for producing CSV formatted output as a view. It, of
> course, can create any sort of delimited format one desires. Here is the POD
> for details.

I have a feeling that this has been done before.

>     $c->stash->{'quote_char'} = '"'; # default: '"'
>
>     $c->stash->{'escape_char'} = '"'; # default: '"'
>
>     $c->stash->{'sep_char'} = '\t'; # default: ','
>
>     $c->stash->{'eol'} = "\n"; # default: "\n"
>
>     $c->stash->{'csv'} = $data;

I think all this stuff should be per-class, not per-request.  If you
need different settings, create another subclass with different
configuration.  Much cleaner.

Regards,
Jonathan Rockway



More information about the Catalyst-dev mailing list