View | Details | Raw Unified | Return to bug 195524 | Differences between
and this patch

Collapse All | Expand All

(-)lib/Mail/SpamAssassin/Conf.pm (+14 lines)
Lines 3862-3867 Link Here
3862
version, and z is maintenance version.  So 3.0.0 is C<3.000000>, and 3.4.80 is
3862
version, and z is maintenance version.  So 3.0.0 is C<3.000000>, and 3.4.80 is
3863
C<3.004080>.
3863
C<3.004080>.
3864
3864
3865
=item perl_version
3866
3867
This will be replaced with the version number of the currently-running
3868
perl engine.  Note: The version used is in the $] version format which is
3869
C<x.yyyzzz>, where x is major version, y is minor version, and z is maintenance
3870
version.  So 5.8.8 is C<5.008008>, and 5.10.0 is C<5.010000>. Use to protect rules
3871
that incorporate RE syntax elements introduced in later versions of perl, such
3872
as the C<++> non-backtracking match. For example:
3873
3874
  # Avoid lint error on older perl installs
3875
  if perl_version >= 5.010000
3876
    body  INVALID_RE_SYNTAX_IN_PERL_5_8_8  /\w++/
3877
  endif
3878
3865
=item plugin(Name::Of::Plugin)
3879
=item plugin(Name::Of::Plugin)
3866
3880
3867
This is a function call that returns C<1> if the plugin named
3881
This is a function call that returns C<1> if the plugin named
(-)lib/Mail/SpamAssassin/Conf/Parser.pm (+3 lines)
Lines 533-538 Link Here
533
    elsif ($token eq 'version') {
533
    elsif ($token eq 'version') {
534
      $eval .= $Mail::SpamAssassin::VERSION." ";
534
      $eval .= $Mail::SpamAssassin::VERSION." ";
535
    }
535
    }
536
    elsif ($token eq 'perl_version') {
537
      $eval .= $]." ";
538
    }
536
    elsif ($token =~ /^\w[\w\:]+$/) { # class name
539
    elsif ($token =~ /^\w[\w\:]+$/) { # class name
537
      my $u = untaint_var($token);
540
      my $u = untaint_var($token);
538
      $eval .= '"' . $u . '" ';
541
      $eval .= '"' . $u . '" ';

Return to bug 195524