You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2006/11/12 22:44:20 UTC

Re: Mail::SpamAssassin::Plugin and Mail::SpamAssassin::Conf

John Rudd writes:
> So, Mail::SpamAssassin::Plugin says, in the doc section for 
> parse_config, that I should store my config data in a 
> Mail::SpamAssassin::Conf object (and that the one I should use is both 
> passed into the options for parse_config and can be accessed as 
> $plugin->{main}->{conf}).
> 
> But, Mail::SpamAssassin::Conf 's perldoc page is not at all oriented 
> around a programming API approach, so I have no idea how to treat that 
> object.
> 
> 
> What I've done for my next release of RelayChecker is treat it just like 
> a hash.
> 
> $self->{main}->{conf}->{mysetting} = $value
> 
> 
> Is that correct, or not?

yep, that's correct.

> Or should I be accessing this object as ... 
> well ... an object (ie. via methods, instead of directly accessing its 
> data).  If that's the case, which perldoc page explains the conf 
> object's methods and such?

Your best bet is to read, and copy, the other plugins ;)

--j.