develooper Front page | perl.qpsmtpd | Postings from July 2005

Re: sender_permitted_from can't call method add on undef

Thread Previous
From:
Bob Dodds
Date:
July 17, 2005 14:06
Subject:
Re: sender_permitted_from can't call method add on undef
Message ID:
1121634422P12148M450663R33Q2@xqme.com
Bob Dodds wrote:
> sender_permitted_from has a fatal error at line 119,
> but look at the previous line--it ends with "if ($result);",
> precisely the test that will fix the error on the next
> line.
>
> Duh.
>
> if ( $result ) {
> [test BOTH lines]
> }
>
> -Bob
Hubris. Now it logs $result and $comment, showing
both ARE defined, but we discover in the output that
perennial bugaboo, the "@", in the comment string.

The error is saying we have an undefined ARRAY in
the comment string, and we can't call method add
on an undefined array, now can we?

$comment =~ s/(\100)/\x40/ ;

If you don't hear from me again on this, it worked
(this message will test to see if \x40 will work in
the add method). If not, try double-quoting single
quotes. If not that, change @ to :at:, because it
only has to be human-understandable.

"'$comment'"

or

$comment =~ s/(\100)/:at:/ ;

-Bob


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About