On Wednesday 21 July 2004 21:11 CET Michael Parker wrote:
> On Wed, Jul 21, 2004 at 12:07:34PM -0700, Justin Mason wrote:
> > Johannes russek writes:
> > > hm, but it calls sa-learn and therefore runs two instances of perl.
> > > isnt that senseless?
> > > what about making Mail::SpamAssassin::CmdLearn avaible as perl
> > > object? 

CmdLearn.pm doesn't exist anymore in 3.0, it all went into the sa-learn 
executable (where it belongs).

> > >[...]
> > > that way i could patch DMZS-sa-learn that it calls a
> > > Mail::SpamAssassin::CmdLearn->new() construct instead of running
> > > sa-learn.
> >[...]
>
> Or just make calls directly into the API, that is what it is there for
> afterall.

If you think that's too complicated, you can also make Perl load the 
sa-learn executable in-process. That's done via the "do" command. Look at 
spamc/configure.pl (the block which starts with a comment "We now call the 
preprocessor in its own namespace") to see how you can feed parameters to 
sa-learn.

As always, there are many+x ways to do this in Perl ;-)

Cheers,
Malte

-- 
[SGT] Simon G. Tatham: "How to Report Bugs Effectively"
      <http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>
[ESR] Eric S. Raymond: "How To Ask Questions The Smart Way"
      <http://www.catb.org/~esr/faqs/smart-questions.html>

Reply via email to