Skip to content

Commit ee28a57

Browse files
committed
Prevent unspecified return (percritic)
1 parent f60ccf2 commit ee28a57

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/DBD/Unify.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ sub primary_key {
530530
if ($catalog) {
531531
$dbh->{Warn} and
532532
Carp::carp "Unify does not support catalogs in table_info\n";
533-
return;
533+
return ();
534534
}
535535

536536
if (my $dd = $dbh->func ("db_dict")) {
@@ -555,7 +555,7 @@ sub primary_key {
555555
@key and return @key;
556556

557557
my $pki_cache = _sys_primary_keys ($dbh);
558-
$pki_cache && $pki_cache->{key} or return;
558+
$pki_cache && $pki_cache->{key} or return @key; # @key still empty
559559

560560
foreach my $sch (sort keys %{$pki_cache->{key}}) {
561561
defined $schema && lc $sch ne lc $schema and next;

0 commit comments

Comments
 (0)