From f108816bf7a6803c81d055b35b076b116506e6f0 Mon Sep 17 00:00:00 2001 From: Marius Gavrilescu Date: Tue, 11 Jun 2019 15:39:33 +0300 Subject: [PATCH] Make perlcritic happy --- lib/IO/Compress/Brotli.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.30.2