From ddc1b91964d3dcccee7f030be4be976d5a2dfddc Mon Sep 17 00:00:00 2001 From: Hanno Hecker Date: Thu, 20 Mar 2008 06:27:42 +0000 Subject: [PATCH] make hook_*_parse() work again git-svn-id: https://svn.perl.org/qpsmtpd/trunk@872 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/Qpsmtpd.pm b/lib/Qpsmtpd.pm index bb53118..9c63658 100644 --- a/lib/Qpsmtpd.pm +++ b/lib/Qpsmtpd.pm @@ -461,7 +461,9 @@ sub run_continuation { last unless $r[0] == DECLINED; } $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); }