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

@ -227,11 +227,11 @@ sub addFileFromFormPost {
close($file);
} else {
$self->_addError("Couldn't open file ".$self->getPath($filename)." for writing due to error: ".$!);
return undef;
return;
}
}
return $filename if $filename;
return undef;
return;
}
@ -465,7 +465,7 @@ it doesn't.
sub deleteFile {
my $self = shift;
my $filename = shift;
return undef if $filename =~ m{\.\./}; ##prevent deleting files outside of this object
return if $filename =~ m{\.\./}; ##prevent deleting files outside of this object
unlink($self->getPath($filename));
}
@ -490,7 +490,7 @@ sub get {
my $class = shift;
my $session = shift;
my $id = shift;
return undef unless $id;
return unless $id;
my $guid = $id;
my $self;
@ -762,7 +762,7 @@ sub getPath {
unless ($self->session->config->get("uploadsPath") && $self->{_part1} && $self->{_part2} && $id) {
$self->_addError("storage object malformed");
return undef;
return;
}
my $path = $self->session->config->get("uploadsPath")
. '/'