I released Sledge::View 0.04 released.
This distribution includes the Sledge::View::CSV.
yeah, Japanese sales person often requires the CSV formatted files ;-)
usage:
package Your::Pages::Admin::Report; use strict; use warnings; use base qw/Sledge::Pages::Compat/; use Sledge::Plugin::View; use Sledge::Plugin::Stash;
__PACKAGE__->add_trigger( AFTER_DISPATCH => sub { my $self = shift; if ($self->r->param('output') eq 'csv') { $self->view('CSV')->process; } else { $self->view('Template')->process; } } );
sub dispatch_report { my $self = shift; $self->stash->{row} = [[qw/a b/], [qw/c d/]]; }
[% col %] | [% END %]