Interesting Error - Can't use string ("1909") as an ARRAY ref
while "strict refs" in use
Drew Marshall
drew.marshall at trunknetworks.com
Wed Mar 11 10:10:36 GMT 2009
On 10 Mar 2009, at 23:08, Rick Cooper wrote:
>>> Ok, so I now have (For the purposes of the record):
>>>
>>> if ($configwords[1] =~ /tr[ua]/i) {
>>> my $i;
>>> for ($i=(@{$body}-1); $i>=0; $i--) {
>>> last if $body->[$i] =~ /^\s*$/i;
>>> pop @{$body};
>>> }
>>> $b->Done();
>>> return;
>>> }
>> Correct.
>>>
>>> Which still works:
>>>
>>> MailScanner --debug
>>> In Debugging mode, not forking...
>>> Trying to setlogsock(unix)
>>> Building a message batch to scan...
>>> Have a batch of 1 message.
>>> max message size is '250000 trackback'
>>> commit ineffective with AutoCommit enabled at
>>> /etc/MailScanner/CustomFunctions/MailWatch.pm line 94,
>> <CLIENT> line 61.
>>> Stopping now as you are debugging me.
>>>
>>> Still in production so tomorrow will give it a true test of
>> a few '000
>>> messages but I'm more than sure it will be fine (But then I
>> said that
>>> last time ;-) ).
>> Oh, how I love working round bugs in Perl :-)
>> Glad we got there in the end though, and the final code is a
>> lot simpler
>> to read than my first version too. I didn't do it this way
>> initially as
>> I don't like breaking out of "for" loops with "last", as that is what
>> the termination condition is for.
>>
>> But it works, and that's the most important bit!
>>
>> Jules
>>
>
> When/If that is a confirmed fix you might want to apply it to
> SMDiskStore.pm
> as well as it appears to share the same original trackback code
>
> Rick
Probably worth lobbing it in a new beta release so more than just
little ol' me gets to test it. Certainly from what I have seen in the
last 12 hours or so, the code looks good with no problems showing up
in any logs.
Drew
More information about the MailScanner
mailing list