Package: spamassassin
Version: 3.0.2-1
Severity: minor
Forwarded: http://bugzilla.spamassassin.org/show_bug.cgi?id=4092
Tags: patch fixed-upstream

This is a really trivial bug, so trivial it can't hurt to fix it... :-) 
The patch has been produced by upstream developer Justin Mason. I have 
confirmed that it applies cleanly to both 3.0.2 and current svn 3.0, 
both with Debian 3.0.2-1 patches. Should be a trivial update, but one 
that's nice to have for Sarge as it won't be fixed by upstream.

The patch is attached.

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (990, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.8.2004-09-07-13.owl.1.oss
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages spamassassin depends on:
ii  debconf                       1.4.30.11  Debian configuration 
management sy
ii  libdigest-sha1-perl           2.10-1     NIST SHA-1 message digest 
algorith
ii  libhtml-parser-perl           3.45-1     A collection of modules 
that parse
ii  perl [libstorable-perl]       5.8.4-6    Larry Wall's Practical 
Extraction
ii  spamc                         3.0.2-1    Client for SpamAssassin 
spam filte

-- debconf information:
* spamassassin/upgrade/2.40:
  spamassassin/upgrade/2.40w:
* spamassassin/upgrade/cancel: Continue
* spamassassin/upgrade/2.42: No
  spamassassin/upgrade/2.42m:
  spamassassin/upgrade/2.42u:
Index: lib/Mail/SpamAssassin/Plugin.pm
===================================================================
--- lib/Mail/SpamAssassin/Plugin.pm	(revision 125891)
+++ lib/Mail/SpamAssassin/Plugin.pm	(working copy)
@@ -598,6 +598,8 @@
 
 C<Mail::SpamAssassin::PerMsgStatus>
 
+http://wiki.apache.org/spamassassin/PluginWritingTips
+
 http://bugzilla.spamassassin.org/show_bug.cgi?id=2163
 
 =cut
Index: lib/Mail/SpamAssassin/PerMsgStatus.pm
===================================================================
--- lib/Mail/SpamAssassin/PerMsgStatus.pm	(revision 125891)
+++ lib/Mail/SpamAssassin/PerMsgStatus.pm	(working copy)
@@ -1032,7 +1032,18 @@
   } @{$info}[0..$amt-1];
 }
 
+###########################################################################
 
+# public API for plugins
+=item $status->set_tag($tagname, $value)
+
+Set a template tag, as used in C<add_header>, report templates, etc. This API
+is intended for use by plugins.   Tag names will be converted to an
+all-uppercase representation internally.  See C<Mail::SpamAssassin::Conf>'s
+C<TEMPLATE TAGS> section for more details on tags.
+
+=cut
+
 sub set_tag {
   my $self = shift;
   my $tag  = uc shift;
@@ -1041,7 +1052,24 @@
   $self->{tag_data}->{$tag} = $val;
 }
 
+# public API for plugins
+=item $string = $status->get_tag($tagname)
 
+Get the current value of a template tag, as used in C<add_header>, report
+templates, etc. This API is intended for use by plugins.  Tag names will be
+converted to an all-uppercase representation internally.  See
+C<Mail::SpamAssassin::Conf>'s C<TEMPLATE TAGS> section for more details on
+tags.
+
+=cut
+
+sub get_tag {
+  # expose this previously-private API
+  return shift->_get_tag(uc shift);
+}
+
+###########################################################################
+
 sub _get_tag_value_for_yesno {
   my $self   = shift;
   

Attachment: pgpqGuXDlII6H.pgp
Description: PGP signature

Reply via email to