perl-modperl-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From do...@apache.org
Subject cvs commit: modperl-2.0/t/filter/TestFilter lc.pm
Date Tue, 03 Apr 2001 00:28:27 GMT
dougm       01/04/02 17:28:27

  Added:       t/filter lc.t
               t/filter/TestFilter lc.pm
  Log:
  add another filter test (lowercase filter)
  
  Revision  Changes    Path
  1.1                  modperl-2.0/t/filter/lc.t
  
  Index: lc.t
  ===================================================================
  use strict;
  use warnings FATAL => 'all';
  
  use Test;
  use Apache::TestRequest;
  
  plan tests => 1;
  
  my $location = "/pod/modperl_2.0.pod";
  
  my $str = GET_BODY $location;
  
  ok $str !~ /[A-Z]/;
  
  
  
  1.1                  modperl-2.0/t/filter/TestFilter/lc.pm
  
  Index: lc.pm
  ===================================================================
  package TestFilter::lc;
  
  use strict;
  use warnings FATAL => 'all';
  
  use Apache::Filter ();
  
  sub handler {
      my $filter = shift;
  
      while ($filter->read(my $buffer, 1024)) {
          $filter->print(lc $buffer);
      }
  
      0;
  }
  
  1;
  __DATA__
  
  <Location /pod>
    PerlOutputFilterHandler TestFilter::lc
  </Location>
  
  Alias /pod @top_dir@/pod
  
  
  

Mime
View raw message