From: Marius Gavrilescu Date: Tue, 11 Jun 2019 12:39:33 +0000 (+0300) Subject: Make perlcritic happy X-Git-Tag: 0.004_002~1 X-Git-Url: http://git.ieval.ro/?a=commitdiff_plain;h=f108816bf7a6803c81d055b35b076b116506e6f0;p=io-compress-brotli.git Make perlcritic happy --- diff --git a/lib/IO/Compress/Brotli.pm b/lib/IO/Compress/Brotli.pm index f1b76e2..ed206a9 100644 --- a/lib/IO/Compress/Brotli.pm +++ b/lib/IO/Compress/Brotli.pm @@ -5,6 +5,8 @@ use strict; use warnings; use parent qw/Exporter/; +use Carp qw/croak/; + use IO::Uncompress::Brotli; our @EXPORT = qw/bro/; @@ -16,7 +18,7 @@ my %BROTLI_ENCODER_MODE = ( generic => 0, text => 1, font => 2 ); sub mode { my ($self, $mode) = @_; - die "Invalid encoder mode" + croak 'Invalid encoder mode' unless $BROTLI_ENCODER_MODE{$mode}; _mode($$self, $mode)