Add perlcritic stuff :)
This commit is contained in:
@@ -96,9 +96,9 @@ sub DirList {
|
||||
$index_of = '/' . $index_of;
|
||||
}
|
||||
|
||||
push @output, "<html>";
|
||||
push @output, '<html>';
|
||||
push @output, sprintf '<head><title>Index of %s/</title></head>', $index_of;
|
||||
push @output, "<body>";
|
||||
push @output, '<body>';
|
||||
push @output, sprintf '<h1>Index of %s/</h1><hr><pre><a href="../">../</a>', $index_of;
|
||||
|
||||
# попробуем отловить все каталоги, начинающиеся с запрошенного пути
|
||||
@@ -187,8 +187,8 @@ sub DirList {
|
||||
}
|
||||
}
|
||||
|
||||
push @output, "</pre><hr></body>";
|
||||
push @output, "</html>";
|
||||
push @output, '</pre><hr></body>';
|
||||
push @output, '</html>';
|
||||
return ('200', 'text/html', join "\n", @output);
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@ sub GetAccessToken {
|
||||
my $refresh_token = $cache->get ('refresh_token');
|
||||
|
||||
unless (defined $refresh_token) {
|
||||
$log->fatal ("No refresh_token found in base, please, register yaproxy application");
|
||||
$log->fatal ('No refresh_token found in base, please, register yaproxy application');
|
||||
exit 1;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ sub RefreshAccessToken {
|
||||
if (defined $token->{access_token}) {
|
||||
return $token;
|
||||
} else {
|
||||
$log->fatal ("[FATAL] Unable to refresh access_token");
|
||||
$log->fatal ('[FATAL] Unable to refresh access_token');
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user