Re: Correcting plugin syntax errors

2008-08-02 Thread Steve Kemp
Well thanks for the big thread, and useful comments. I took the conclusion that the syntax testing, in isolation, was generally viewed to be a bad idea and that it might actually make more sense to *remove* any occurances of use ..constants from existing plugins, so we could test

Re: Correcting plugin syntax errors

2008-07-30 Thread Jose Luis Martinez
Matt Sergeant escribió: On Tue, 29 Jul 2008, Jose Luis Martinez wrote: BTW: any comment on how to elaborate a testing framework. Comments from the QP-gurus would be helpful. For some in house code here that's similar to Qpsmtpd we basically have a data driven test system. You specify in a

Re: Correcting plugin syntax errors

2008-07-29 Thread Brian Szymanski
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

Re: Correcting plugin syntax errors

2008-07-29 Thread Robert Spier
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

Re: Correcting plugin syntax errors

2008-07-29 Thread Brian Szymanski
Robert Spier wrote: 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

Re: Correcting plugin syntax errors

2008-07-29 Thread Ask Bjørn Hansen
The inspiration for the file based plugins were Apache::Registry in mod_perl -- hide as much of the nitty gritty as possible and allow the user to just write the code that actually does stuff for them. On that track then I think it's reasonable to add whatever boiler plate code is

Re: Correcting plugin syntax errors

2008-07-29 Thread Jose Luis Martinez
Matt Sergeant escribió: 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

Re: Correcting plugin syntax errors

2008-07-29 Thread Peter J. Holzer
On 2008-07-28 22:54:20 -0700, 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

Re: Correcting plugin syntax errors

2008-07-29 Thread Matt Sergeant
On Tue, 29 Jul 2008, Jose Luis Martinez wrote: BTW: any comment on how to elaborate a testing framework. Comments from the QP-gurus would be helpful. For some in house code here that's similar to Qpsmtpd we basically have a data driven test system. You specify in a config file what plugins

Re: Correcting plugin syntax errors

2008-07-28 Thread Steve Kemp
On Mon Jul 28, 2008 at 16:44:08 -0400, John Peacock wrote: The plugins were not originally intended to be complete Perl scripts but rather are stubs which are loaded by Qpsmptd::Plugins (which includes Qpsmtpd::Constants already). It doesn't actually hurt to apply the patch, but it is

Re: Correcting plugin syntax errors

2008-07-28 Thread Robert Spier
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