Cosmetic: wrapped long code line
[catagits/Catalyst-Runtime.git] / t / lib / TestAppEncoding / Controller / Root.pm
CommitLineData
5ab21903 1package TestAppEncoding::Controller::Root;
2use strict;
3use warnings;
4use base 'Catalyst::Controller';
5use Test::More;
6
7__PACKAGE__->config->{namespace} = '';
8
9sub binary : Local {
10 my ($self, $c) = @_;
efcb1ae7 11 $c->res->body(do {
12 open(my $fh, '<', $c->path_to('..', '..', 'catalyst_130pix.gif')) or die $!;
13 binmode($fh);
14 local $/ = undef; <$fh>;
15 });
5ab21903 16}
17
18sub binary_utf8 : Local {
19 my ($self, $c) = @_;
20 $c->forward('binary');
21 my $str = $c->res->body;
22 utf8::upgrade($str);
23 ok utf8::is_utf8($str), 'Body is variable width encoded string';
24 $c->res->body($str);
25}
26
27sub end : Private {
28 my ($self,$c) = @_;
29}
30
311;