Robert Spier wrote:
> Matt Sergeant wrote:
>   
>> On Mon, 28 Jul 2008 20:47:39 -0400, Brian Szymanski wrote:
>>     
>>> Then let's make that diff instead - remove all the "use
>>> Qpsmtpd::Constants" in plugins, and add your test harness?
>>>       
>> I agree. Make your tester run the same code in Qpsmtpd.pm (or is it now 
>> in Plugin.pm, I don't recall) that compiles the plugins and checks the 
>> status.
>>     
>
> I'm actually +1 on making the plugins more syntactically correct.
> It's really useful to be able to just run perl -c on them.    I don't
> see a downside.
>   

I may have an extreme view on this, but... Systems that re-use the same
module in lots of other different modules tend to annoy me, because the
author hasn't thought out what needs to be imported when - instead
they've just fired a shotgun blast of use statements around until things
stopped erroring out. It's also nice to have terse code.

> Putting complex logic in the tester, or duplicating that logic is a
> bad idea.
>   
I don't see what's complex about adding a "use Qpsmtpd::Constants;\n" to
the block to be eval'd from the test script. As I pointed out before,
not all plugins are in svn and we don't want to fail them for doing
things this way. So, since it's a simple change to support these cases
as well, the best solution is to be consistent and drop the use
statement everywhere except the test script for uniformity.


Reply via email to