Changeset 635

Show
Ignore:
Timestamp:
05/03/02 22:43:56
Author:
miyagawa
Message:

0.05 release

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Apache-AntiSpam/trunk/Changes

    r92 r635  
    11Revision history for Perl extension Apache::AntiSpam. 
     2 
     30.05  Fri May  3 22:27:43 JST 2002 
     4        - no tie()ing STDOUT to shut up bleadperl 
    25 
    360.04  Thu Jun 21 04:59:13 JST 2001 
  • Apache-AntiSpam/trunk/lib/Apache/AntiSpam.pm

    r94 r635  
    33use strict; 
    44use vars qw($VERSION); 
    5 $VERSION = '0.05'
     5$VERSION = 0.05
    66 
    77use Apache::Constants qw(:common); 
     
    2121    # AntiSpam filtering is done on text/* files 
    2222    return DECLINED unless ($r->content_type =~ m,^text/, && $r->is_main); 
    23      
     23 
    2424    my($fh, $status); 
    2525    if ($filtered) { 
     
    3131 
    3232    return DECLINED unless $fh; 
    33      
     33 
    3434    # finds and replaces e-mail addresses 
    3535    # if-statement should be outside the sub for efficiency 
     
    6060 
    6161    return OK; 
    62 }     
     62} 
    6363 
    6464sub antispamize { 
     
    6767    return $orig; 
    6868} 
    69      
    7069 
    71701; 
     
    118117=over 4 
    119118 
    120 =item Declare your class 
     119=item * 
    121120 
    122 =item Inherit from Apache::AntiSpam 
     121Declare your class 
    123122 
    124 =item define antispamize() method 
     123=item * 
     124 
     125Inherit from Apache::AntiSpam 
     126 
     127=item * 
     128 
     129define antispamize() method 
    125130 
    126131=back 
  • Apache-AntiSpam/trunk/t/lib/FilterTest.pm

    r90 r635  
    1717sub filters { 
    1818    my($file, $class) = @_; 
    19     tie *STDOUT, 'Tie::STDOUT', \my $output; 
    2019    my $r = Apache::FakeRequest->new( 
    2120        content_type => 'text/plain', 
     
    2322        filename => $file, 
    2423    ); 
     24 
     25    my $out; 
     26    local $^W; 
     27    local *Apache::FakeRequest::print = sub { 
     28        shift; 
     29        $out .= join '', @_; 
     30    }; 
     31 
    2532    $class->handler($r); 
    26     return $output
     33    return $out
    2734} 
    2835 
    29 package Tie::STDOUT; 
    30  
    31 sub TIEHANDLE { 
    32     my($class, $ref) = @_; 
    33     bless $ref, $class; 
    34 } 
    35  
    36 sub PRINT { 
    37     my $self = shift; 
    38     $$self .= join '', @_; 
    39 } 
    40  
    41  
    42361;