refactor the hardcoded attribute stuff in as_dot
[scpubgit/stemmatology.git] / TreeOfTexts / lib / TreeOfTexts / View / SVG.pm
1 package TreeOfTexts::View::SVG;
2
3 use strict;
4 use base 'Catalyst::View';
5 use Encode qw( decode_utf8 );
6
7 sub process {
8         my( $self, $c ) = @_;
9         $c->res->content_type( 'image/svg+xml' );
10         $c->res->content_encoding( 'UTF-8' );
11         $c->res->output( decode_utf8( $c->stash->{result} ) );
12 }
13
14 1;