qpsmtpd icon indicating copy to clipboard operation
qpsmtpd copied to clipboard

Fix XX: Can't call method "notes" on unblessed reference at /home/smtpd/...

Open salvis opened this issue 10 years ago • 2 comments

...qpsmtpd/plugins/logging/file line 282 and line 288.

Second try after https://github.com/smtpd/qpsmtpd/pull/225.

I refactored the postfix if as requested, but it looks weird. If UNIVERSAL::can($transaction,'isa') is true, then $transaction is true, too, right? So, the original postfix if was redundant?

Why do we check for 'isa' anyway? Wouldn't the check for 'notes' be sufficient?

And, if we don't have notes, shouldn't we add it? Could this explain why I'm seeing LOGDEBUG output from a single transaction spread over several files (with seconds in the file name)?

salvis avatar Feb 08 '15 16:02 salvis

I find the best way to illuminate the subtleties is to write some test coverage. If this PR introduced tests that exercised the code, I bet it would be better understood, and I'd be inclined to merge it.

msimerson avatar Apr 20 '16 04:04 msimerson

I'm sorry, this is beyond my abilities. I earn my living in professional C++/C# development and I do other open source development, but I don't have enough exposure to Perl to understand why I've been getting that error message (and apparently no one else), what it's trying to tell me, or to write a meaningful test that would take my seemingly unique situation into account.

I'll be setting up a new server in a while, and maybe this problem will go away...

salvis avatar Apr 21 '16 21:04 salvis