Re: Plugin modules (My::Plugin) / plugins on CPAN

2006-07-13 Thread Philip M. Gollucci

Ask Bjørn Hansen wrote:

  # local %ENV = ();

You don't want to do that in mp2 land.  See the perl.apache.org lists for our 
struggles.
[I realize its commented out]


--

Philip M. Gollucci ([EMAIL PROTECTED]) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F  6A47 D55A 7172 A799 97F

It takes a minute to have a crush on someone, an hour to like someone,
and a day to love someone, but it takes a lifetime to forget someone...


Re: Plugin modules (My::Plugin) / plugins on CPAN

2006-06-30 Thread David Wheeler

On Jun 27, 2006, at 22:57, Ask Bjørn Hansen wrote:

Some time ago there was discussion about contributors distributing  
plugins on CPAN.I made a change so that should be possible.  I  
didn't do more than the most basic testing, so I didn't commit it.   
Feedback welcome.


Excellent!

The patch below should apply to the latest code from the 0.3x branch 
[1].   After applying the patch you should be able to make a module  
like the following (just install it as a regular perl module) and  
then add My::Plugin to the config/plugins file to load it.


That looks really simple, Ask, and exactly what I was hoping to see.  
I think that this will go a long way towards assisting the success of  
qptsmptd.


Best,

David

Re: Plugin modules (My::Plugin) / plugins on CPAN

2006-06-28 Thread Matt Sergeant


On 28-Jun-06, at 1:57 AM, Ask Bjørn Hansen wrote:

   2) Make load_plugins or Qpsmtpd::Plugin smart enough that we  
won't need plugin_name in each plugin.


That's a trivial change to your patch. Just make line 68 of the patch:

+  my $eval = require $package;\nsub ${plugin}::plugin_name  
{ '$plugin' };

Re: Plugin modules (My::Plugin) / plugins on CPAN

2006-06-28 Thread Andrew Pam
On Wed, Jun 28, 2006 at 10:41:51AM -0400, Matt Sergeant wrote:
 +  my $eval = require $package;\nsub ${plugin}::plugin_name  
 { '$plugin' };

Why the \n?  It seems to me that a space would be more readable
and have the same effect.

Regards,
Andrew
-- 
mailto:[EMAIL PROTECTED] Andrew Pam
http://www.xanadu.com.au/   Chief Scientist, Xanadu
http://www.glasswings.com.au/   Partner, Glass Wings
http://www.sericyb.com.au/  Manager, Serious Cybernetics


Re: Plugin modules (My::Plugin) / plugins on CPAN

2006-06-28 Thread Matt Sergeant

On 28-Jun-06, at 11:43 AM, Andrew Pam wrote:


On Wed, Jun 28, 2006 at 10:41:51AM -0400, Matt Sergeant wrote:

+  my $eval = require $package;\nsub ${plugin}::plugin_name
{ '$plugin' };


Why the \n?  It seems to me that a space would be more readable
and have the same effect.


Bikeshed painting is thataway --

;-)