first round of Perl::Critic cleanups. Do not use return undef, use a bare return instead
This commit is contained in:
parent
75041656ee
commit
96178fd70c
92 changed files with 209 additions and 209 deletions
|
|
@ -54,7 +54,7 @@ Handles a click on an advertisement.
|
|||
sub www_clickAd {
|
||||
my $session = shift;
|
||||
my $id = $session->form->param("id");
|
||||
return undef unless $id;
|
||||
return unless $id;
|
||||
my $url = WebGUI::AdSpace->countClick($session, $id);
|
||||
$session->http->setRedirect($url);
|
||||
return "Redirecting to $url";
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ sub _get {
|
|||
}
|
||||
else {
|
||||
$session->errorHandler->warn("Unable to load help for $namespace -> $id");
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ sub www_ssoViaSessionId {
|
|||
}
|
||||
}
|
||||
}
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -41,12 +41,12 @@ An instanciated session object.
|
|||
sub _getSpeller {
|
||||
my ($baseDir, $userDir, $homeDir);
|
||||
my $session = shift;
|
||||
return undef unless Text::Aspell->can('new');
|
||||
return unless Text::Aspell->can('new');
|
||||
my $speller = Text::Aspell->new;
|
||||
|
||||
# Get language
|
||||
my $lang = $session->form->process('lang');
|
||||
return undef unless (isIn($lang, map {m/^.*?:([^:]*):.*?$/} $speller->list_dictionaries));
|
||||
return unless (isIn($lang, map {m/^.*?:([^:]*):.*?$/} $speller->list_dictionaries));
|
||||
|
||||
# User homedir
|
||||
my $userId = $session->user->userId;
|
||||
|
|
|
|||
|
|
@ -537,7 +537,7 @@ sub www_setWorkingVersionTag () {
|
|||
$tag->setWorking();
|
||||
}
|
||||
if ($session->form->param("backToSite")) {
|
||||
return undef;
|
||||
return;
|
||||
}
|
||||
return www_manageVersions($session);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue