Sledge::View::CSV - Sledge::Pages::Base compatible view.
SYNOPSIS
package Your::Pages;
use Sledge::Plugin::View;
sub dispatch_foo {
my $self = shift;
$self->stash->{rows} = [[qw/a b/], [qw/c d/]];
Sledge::View::CSV->new( $self )->process;
}
# output is...
a,b
c,d
METHODS
new
Sledge::View::CSV->new($page);
generate new instance.The argument is instance of Sledge::Pages::Base.
process
Set the contents and headers to $self->response.
render
rendering the csv.
CONFIGURATION
$self->stash->{csv_option} = {sep_char => "t"};
You can set the argument of Text::CSV_XS->new;
Product's homepage
Requirements:
· Perl