I'm trying to gunzip some data with Gzip::Faster;
If the compressed data valid - everything works fine, but when the input data is bad or absent - i have error message and crash. EVAL do not help to stop it
use Gzip::Faster;
my $gz = '';
my $data;
eval { $data = gunzip( $gz ); };
if ($@) { say "can't unzip file"; exit; };
and the output is "Attempt to uncompress empty string at ....."
with crashing of script without EVAL or continuing with EVAL
How to handle this error and do not output any default messages?
BUT! if the file is not empty but not proper format - in this case this script hanle error correctly!