0

Add perlcritic stuff :)

This commit is contained in:
eleksir
2021-05-30 14:30:00 +03:00
parent 0c147086c0
commit e655c11e0b
13 changed files with 127 additions and 20 deletions

View File

@@ -22,16 +22,16 @@ sub LoadConf {
my $readlen = read $CH, $json, $len;
unless ($readlen) {
close $CH; ## no critic (InputOutput::RequireCheckedSyscalls
close $CH;
die "[FATAL] Unable to read $c: $OS_ERROR\n";
}
if ($readlen != $len) {
close $CH; ## no critic (InputOutput::RequireCheckedSyscalls
close $CH;
die "[FATAL] File $c is $len bytes on disk, but we read only $readlen bytes\n";
}
close $CH; ## no critic (InputOutput::RequireCheckedSyscalls
close $CH;
my $j = JSON::XS->new->utf8->relaxed;
return $j->decode ($json);
}