make hook_*_parse() work again

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@872 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
Hanno Hecker 2008-03-20 06:27:42 +00:00
parent c076c10eae
commit ddc1b91964

View File

@ -461,7 +461,9 @@ sub run_continuation {
last unless $r[0] == DECLINED; last unless $r[0] == DECLINED;
} }
$r[0] = DECLINED if not defined $r[0]; $r[0] = DECLINED if not defined $r[0];
@r = map { split /\n/ } @r; # hook_*_parse() may return a CODE ref..
# ... which breaks when splitting as string:
@r = map { split /\n/ } @r unless (ref($r[1]) eq "CODE");
return $self->hook_responder($hook, \@r, $args); return $self->hook_responder($hook, \@r, $args);
} }