Commit | Line | Data |
6cf17f04 |
1 | package stemmaweb::View::TSV; |
2 | use Moose; |
3 | use namespace::autoclean; |
4 | |
5 | extends 'Catalyst::View'; |
6 | |
7 | sub process { |
8 | my( $self, $c ) = @_; |
9 | $c->res->content_type( 'text/tab-separated-values' ); |
10 | $c->res->content_encoding( 'UTF-8' ); |
11 | $c->res->header( 'Content-Disposition', |
12 | sprintf( "attachment; filename=\"%s.tsv\"", $c->stash->{name} ) ); |
13 | $c->res->output( $c->stash->{result} ); |
14 | } |
15 | |
16 | =head1 NAME |
17 | |
18 | stemmaweb::View::TSV - Catalyst View |
19 | |
20 | =head1 DESCRIPTION |
21 | |
22 | Catalyst View. |
23 | |
24 | |
25 | =encoding utf8 |
26 | |
27 | =head1 AUTHOR |
28 | |
29 | Tara L Andrews |
30 | |
31 | =head1 LICENSE |
32 | |
33 | This library is free software. You can redistribute it and/or modify |
34 | it under the same terms as Perl itself. |
35 | |
36 | =cut |
37 | |
38 | __PACKAGE__->meta->make_immutable; |
39 | |
40 | 1; |