fixup perlcritic: indirect new

> Subroutine new called using indirect syntax at line 14, column 14.  See page 349 of PBP.  (Severity: 5)
This commit is contained in:
Your Name 2021-08-19 16:25:21 -04:00
parent 241985fb2d
commit 4632132d02
5 changed files with 6 additions and 6 deletions

View file

@ -143,7 +143,7 @@ sub google_login :Path('/google-login') Args(0) {
error($c, "Logging in via Google is not enabled.") unless $c->config->{enable_google_login};
my $ua = new LWP::UserAgent;
my $ua = LWP::UserAgent->new();
my $response = $ua->post(
'https://www.googleapis.com/oauth2/v3/tokeninfo',
{ id_token => ($c->stash->{params}->{id_token} // die "No token."),
@ -171,7 +171,7 @@ sub github_login :Path('/github-login') Args(0) {
};
die "No github secret configured" unless $client_secret;
my $ua = new LWP::UserAgent;
my $ua = LWP::UserAgent->new();
my $response = $ua->post(
'https://github.com/login/oauth/access_token',
{

View file

@ -44,7 +44,7 @@ sub getHydraConfig {
my $conf = $ENV{"HYDRA_CONFIG"} || (Hydra::Model::DB::getHydraPath . "/hydra.conf");
my %opts = (%Hydra::Config::configGeneralOpts, -ConfigFile => $conf);
if (-f $conf) {
my %h = new Config::General(%opts)->getall;
my %h = Config::General->new(%opts)->getall;
$hydraConfig = \%h;
} else {

View file

@ -11,7 +11,7 @@ sub process {
my @storePaths = @{$c->stash->{storePaths}};
my $fh = new IO::Handle;
my $fh = IO::Handle->new();
open $fh, "nix-store --export `nix-store -qR @storePaths` | gzip |";

View file

@ -11,7 +11,7 @@ sub process {
$c->response->content_type('text/plain; charset=utf-8');
my $fh = new IO::Handle;
my $fh = IO::Handle->new();
my $tail = int($c->stash->{tail} // "0");

View file

@ -13,7 +13,7 @@ sub process {
$c->response->content_type('application/x-nix-archive'); # !!! check MIME type
my $fh = new IO::Handle;
my $fh = IO::Handle->new();
open $fh, "nix-store --dump '$storePath' | pixz -0 $pParam |";