1Catalyst::Response::WriUtseerr(3C)ontributed Perl DocumeCnattaatliyosnt::Response::Writer(3)
2
3
4
6 Catalyst::Response::Writer - Proxy over the PSGI Writer
7
9 sub myaction : Path {
10 my ($self, $c) = @_;
11 my $w = $c->response->writer_fh;
12
13 $w->write("hello world");
14 $w->close;
15 }
16
18 This wraps the PSGI writer (see
19 PSGI.pod\Delayed-Response-and-Streaming-Body) for more. We wrap this
20 object so we can provide some additional methods that make sense from
21 inside Catalyst
22
24 This class does the following methods
25
26 write
27 close
28 These delegate to the underlying PSGI writer object
29
30 write_encoded
31 If the application defines a response encoding (default is UTF8) and
32 the content type is a type that needs to be encoded (text types like
33 HTML or XML and Javascript) we first encode the line you want to write.
34 This is probably the thing you want to always do. If you use the
35 \write method directly you will need to handle your own encoding.
36
38 Catalyst Contributors, see Catalyst.pm
39
41 This library is free software. You can redistribute it and/or modify it
42 under the same terms as Perl itself.
43
44
45
46perl v5.32.0 2020-07-28 Catalyst::Response::Writer(3)