1Catalyst::Plugin::ComprUessesr(3C)ontributed Perl DocumeCnattaatliyosnt::Plugin::Compress(3)
2
3
4

NAME

6       Catalyst::Plugin::Compress - Compress response
7

SYNOPSIS

9           use Catalyst qw/Compress/;
10
11       or (Catalyst pre Unicode Merge, and If you want to use this plugin with
12       Catalyst::Plugin::Unicode.)
13
14           use Catalyst qw/
15               Unicode
16               Compress
17           /;
18
19       or (Catalyst 5.90080 and later)
20
21           use Catalyst qw/
22               Compress
23           /;
24
25       Remember to specify compression_format with:
26
27           __PACKAGE__->config(
28               compression_format => $format,
29           );
30
31       $format can be either gzip bzip2 zlib or deflate.  bzip2 is *only*
32       supported by lynx and some other console text-browsers.
33

DESCRIPTION

35       This module combines Catalyst::Plugin::Deflate Catalyst::Plugin::Gzip
36       Catalyst::Plugin::Zlib into one.
37
38       It compress response to [gzip bzip2 zlib deflate] if client supports
39       it.  In other works the client should send the Accept-Encoding HTTP
40       header with a supported compression like 'gzip'.
41
42       NOTE: If you are using an older version of Catalyst that requires the
43       Unicode plugin and if you want to use this module with
44       Catalyst::Plugin::Unicode, You MUST load this plugin AFTER
45       Catalyst::Plugin::Unicode.
46
47           use Catalyst qw/
48               Unicode
49               Compress
50           /;
51
52       If you don't, You'll get error which is like:
53
54       [error] Caught exception in engine "Wide character in subroutine entry
55       at /usr/lib/perl5/site_perl/5.8.8/Compress/Zlib.pm line xxx."
56
57       If you upgrade to any version of Catalyst 5.90080+ the unicode support
58       has been integrated into core code and this plugin is designed to work
59       with that.
60

INTERNAL METHODS

62   should_compress_response
63       This method determine wether compressing the reponse using this plugin.
64

SEE ALSO

66       Catalyst.
67

AUTHOR

69       Yiyi Hu "yiyihu@gmail.com"
70

LICENSE

72       This library is free software. You can redistribute it and/or modify it
73       under the same terms as perl itself.
74
75
76
77perl v5.30.0                      2019-07-26     Catalyst::Plugin::Compress(3)
Impressum