> From: Justin Mason [mailto:[EMAIL PROTECTED]] > > > OK, I've located the leak, and getting strong deja-vu > *sigh*. I fixed > > this in PerMsgStatus - it's the usage of 'main' to get back to > > Mail::SpamAssassin, this time in Mail::SpamAssassin::Conf. People - > > circular refs are bad, m'kay? > > > > But I'm not including a patch, because I'm not entirely > sure what the > > right patch is. The reason 'main' is used in Conf.pm is to access > > sed_path(). But I see absolutely no reason for sed_path to > be an object > > method. It should either be a class method (i.e. called as > > Mail::SpamAssassin->sed_path()) or it should be a plain > function, and > > perhaps put into an @EXPORT_OK list so you can import it. > > > > What would people prefer? I'd personally go for the function + > > @EXPORT_OK method. > > hmm, I prefer class methods, but I don't have too many > problems with it. > But is that really the only use of 'main' in Conf? seems wierd.
It is unless something is accessing conf->{main} directly somewhere in another class. I "fixed" it in my local copy by simply using a lexical variable to store the $parent (or 'main') which then goes out of scope at the end of new(). It works, but it still doesn't seem clean. Maybe I'll spend some time this week giving SA a thorough code review, and cleaning up bits I think should be changed. Then I can submit a big cleanup patch and you can see which changes you like or hate. Oh, in other news I gave an interview to Information Week yesterday to talk about spam and our spam solution. I couldn't talk about SpamAssassin directly (company rules and all), but if you get to read the article (mid february apparently) you can know that some of the stuff I was talking about is a result of using SA here (we do use other code too though). Matt. This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk _______________________________________________ Spamassassin-talk mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/spamassassin-talk