first round of Perl::Critic cleanups. Do not use return undef, use a bare return instead

This commit is contained in:
Colin Kuskie 2007-12-05 00:30:43 +00:00
parent 75041656ee
commit 96178fd70c
92 changed files with 209 additions and 209 deletions

View file

@ -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";

View file

@ -157,7 +157,7 @@ sub _get {
}
else {
$session->errorHandler->warn("Unable to load help for $namespace -> $id");
return undef;
return;
}
}

View file

@ -45,7 +45,7 @@ sub www_ssoViaSessionId {
}
}
}
return undef;
return;
}

View file

@ -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;

View file

@ -537,7 +537,7 @@ sub www_setWorkingVersionTag () {
$tag->setWorking();
}
if ($session->form->param("backToSite")) {
return undef;
return;
}
return www_manageVersions($session);
}