Catalyst::Plugin::Compress(3pm)

Catalyst::Plugin::Compress3pm

Compress response

Usage

    use Catalyst qw/Compress/;

or

    use Catalyst qw/
        Unicode
        Compress
    /;

If you want to use this plugin with Catalyst::Plugin::Unicode.

Remember to specify compression_format with:

    __PACKAGE__->config(
        compression_format => $format,
    );

$format can be either gzip bzip2 zlib or deflate. bzip2 is *only* supported by lynx and some other console text-browsers.

Overview

This module combines Catalyst::Plugin::Deflate Catalyst::Plugin::Gzip Catalyst::Plugin::Zlib into one.

It compress response to [gzip bzip2 zlib deflate] if client supports it.

NOTE: If you want to use this module with Catalyst::Plugin::Unicode, You MUST load this plugin AFTER Catalyst::Plugin::Unicode.

    use Catalyst qw/
        Unicode
        Compress
    /;

If you don't, You'll get error which is like:

[error] Caught exception in engine "Wide character in subroutine entry at /usr/lib/perl5/site_perl/5.8.8/Compress/Zlib.pm line xxx."

Internal methods

should_compress_response

This method determine wether compressing the reponse using this plugin.

Releases

6 releases since Debian 8 (Jessie); the text changed 1 time.

  1. 8–10
  2. 11–13

Author

Yiyi Hu "[email protected]"

License

This library is free software. You can redistribute it and/or modify it under the same terms as perl itself.

From libcatalyst-plugin-compress-perl 0.5-1.1 in Debian 13 (Trixie). Parsed by carta from the page's man source.