mirror of
https://github.com/postgres/postgres.git
synced 2025-12-10 14:22:35 +03:00
Don't fall off the end of perl functions
This complies with the perlcritic policy Subroutines::RequireFinalReturn, which is a severity 4 policy. Since we only currently check at severity level 5, the policy is raised to that level until we move to level 4 or lower, so that any new infringements will be caught. A small cosmetic piece of tidying of the pgperlcritic script is included. Mike Blackwell Discussion: https://postgr.es/m/CAESHdJpfFm_9wQnQ3koY3c91FoRQsO-fh02za9R3OEMndOn84A@mail.gmail.com
This commit is contained in:
@@ -62,6 +62,7 @@ sub ::encode_array_constructor
|
||||
(my $msg = shift) =~ s/\(eval \d+\) //g;
|
||||
chomp $msg;
|
||||
&::elog(&::WARNING, $msg);
|
||||
return;
|
||||
}
|
||||
$SIG{__WARN__} = \&plperl_warn;
|
||||
|
||||
|
||||
@@ -99,4 +99,5 @@ sub selftest
|
||||
warn "Test string: $string\n";
|
||||
warn "Result : $result";
|
||||
die "Failed!" if $result ne "$string\n";
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user