[svn:modperl-modules] rev 232 - in Apache-DebugFilter/trunk: . lib/Apache2 t/response/TestDebugFilter

[email protected]@cvs.perl.org 4 Jul 2005 01:08:33 -0000
Newsgroups perl.modperl.modules.svn
Message-ID <[email protected]>
Author: [email protected]
Date: Sun Jul  3 18:08:32 2005
New Revision: 232

Modified:
   Apache-DebugFilter/trunk/Changes
   Apache-DebugFilter/trunk/MANIFEST
   Apache-DebugFilter/trunk/Makefile.PL
   Apache-DebugFilter/trunk/lib/Apache2/DebugFilter.pm
   Apache-DebugFilter/trunk/t/response/TestDebugFilter/bb_dump.pm
   Apache-DebugFilter/trunk/t/response/TestDebugFilter/snoop.pm
Log:
account for mp2 API rename


Modified: Apache-DebugFilter/trunk/Changes
==============================================================================
--- Apache-DebugFilter/trunk/Changes	(original)
+++ Apache-DebugFilter/trunk/Changes	Sun Jul  3 18:08:32 2005
@@ -1,19 +1,16 @@
 Revision history for Perl extension Apache::DebugFilter.
 
-0.01_04
-	- Maintainership handed over to 
-	Philip M. Gollucci <[email protected]>
-
 0.01_03
+- Account for API rename post mp2 RC5
+Philip M. Gollucci <[email protected]>
 
-
+- Maintainership handed over to 
+Philip M. Gollucci <[email protected]>
 
 0.01_02 - Sun Jan  2 18:27:17 EST 2005
 
 - fix the manpage's title
 
-
-
 0.01_01 - Sun Jan  2 18:15:20 EST 2005
 
 - bring the module and tests up-to-date with mp-1.99_15

Modified: Apache-DebugFilter/trunk/MANIFEST
==============================================================================
--- Apache-DebugFilter/trunk/MANIFEST	(original)
+++ Apache-DebugFilter/trunk/MANIFEST	Sun Jul  3 18:08:32 2005
@@ -1,5 +1,5 @@
 Changes
-DebugFilter.pm
+lib/Apache2/DebugFilter.pm
 Makefile.PL
 MANIFEST
 run_version_tests

Modified: Apache-DebugFilter/trunk/Makefile.PL
==============================================================================
--- Apache-DebugFilter/trunk/Makefile.PL	(original)
+++ Apache-DebugFilter/trunk/Makefile.PL	Sun Jul  3 18:08:32 2005
@@ -16,21 +16,21 @@ for (@scripts) {
 }
 
 my %require = (
-    "Apache::Test" => "1.10", # ipv6 fixes
-    "mod_perl"     => "1.9922",
+    "Apache::Test" => "1.25", # ipv6 fixes
+    "mod_perl"     => "2.000001"
 );
 
 ModPerl::MM::WriteMakefile(
-    NAME          => "Apache::DebugFilter",
-    VERSION_FROM  => "DebugFilter.pm",
+    NAME          => "Apache2::DebugFilter",
+    VERSION_FROM  => "lib/Apache2/DebugFilter.pm",
     clean         => {
         FILES => "@clean_files",
     },
-    ABSTRACT_FROM => 'DebugFilter.pm',
+    ABSTRACT_FROM => 'lib/Apache2/DebugFilter.pm',
     AUTHOR        => 'Philip M. Gollucci',
     PREREQ_PM     => \%require,
     dist          => {
-        PREOP        => 'pod2text DebugFilter.pm > $(DISTVNAME)/README',
+        PREOP        => 'pod2text lib/Apache2/DebugFilter.pm > $(DISTVNAME)/README',
         COMPRESS     => 'gzip -9f',
         SUFFIX       => '.gz',
         ZIP          => 'zip',

Modified: Apache-DebugFilter/trunk/lib/Apache2/DebugFilter.pm
==============================================================================
--- Apache-DebugFilter/trunk/lib/Apache2/DebugFilter.pm	(original)
+++ Apache-DebugFilter/trunk/lib/Apache2/DebugFilter.pm	Sun Jul  3 18:08:32 2005
@@ -1,11 +1,11 @@
-package Apache::DebugFilter;
+package Apache2::DebugFilter;
 
-use mod_perl 1.99;
+use mod_perl2;
 
 use strict;
 use warnings FATAL => 'all';
 
-$Apache::DebugFilter::VERSION = '0.02_01';
+$Apache2::DebugFilter::VERSION = '0.01_03';
 
 use base qw(Apache2::Filter);
 use Apache2::FilterRec ();
@@ -89,28 +89,28 @@ __END__
 
 =head1 NAME
 
-Apache::DebugFilter - Debug mod_perl and native Apache2 filters
+Apache2::DebugFilter - Debug mod_perl and native Apache2 filters
 
 =head1 Synopsis
 
   # httpd.conf
   # ----------
-  PerlModule Apache::DebugFilter
+  PerlModule Apache2::DebugFilter
   # Connection snooping (everything)
-  PerlInputFilterHandler  Apache::DebugFilter::snoop_connection
-  PerlOutputFilterHandler Apache::DebugFilter::snoop_connection
+  PerlInputFilterHandler  Apache2::DebugFilter::snoop_connection
+  PerlOutputFilterHandler Apache2::DebugFilter::snoop_connection
   
   # HTTP Request snooping (only HTTP request body)
   <Location /foo>
-      PerlInputFilterHandler  Apache::DebugFilter::snoop_request
-      PerlOutputFilterHandler Apache::DebugFilter::snoop_request
+      PerlInputFilterHandler  Apache2::DebugFilter::snoop_request
+      PerlOutputFilterHandler Apache2::DebugFilter::snoop_request
   </Location>
 
   # in handlers
   #------------
-  use Apache::DebugFilter;
+  use Apache2::DebugFilter;
   # convert bb to an array of bucket_type => data pairs
-  my $ra_data = Apache::DebugFilter::bb_dump($bb);
+  my $ra_data = Apache2::DebugFilter::bb_dump($bb);
   while (my($btype, $data) = splice @data, 0, 2) {
       print "$btype => $data\n";
   }
@@ -140,28 +140,28 @@ figures out what kind of stream it's wor
 To configure the input snooper, add to the top level server or virtual
 host configuration in httpd.conf:
 
-  PerlInputFilterHandler  Apache::DebugFilter::snoop_connection
+  PerlInputFilterHandler  Apache2::DebugFilter::snoop_connection
 
 To snoop on response output, add:
 
-  PerlOutputFilterHandler Apache::DebugFilter::snoop_connection
+  PerlOutputFilterHandler Apache2::DebugFilter::snoop_connection
 
 Both can be configured at the same time.
 
-If you want to snoop on what an output filter MyApache::Filter::output
+If you want to snoop on what an output filter MyApache2::Filter::output
 does, put the snooper filter after it:
 
-  PerlOutputFilterHandler MyApache::Filter::output
-  PerlOutputFilterHandler Apache::DebugFilter::snoop_connection
+  PerlOutputFilterHandler MyApache2::Filter::output
+  PerlOutputFilterHandler Apache2::DebugFilter::snoop_connection
 
 On the contrary, to snoop on what an input filter
-MyApache::Filter::input does, put the snooper filter before it:
+MyApache2::Filter::input does, put the snooper filter before it:
 
-  PerlInputFilterHandler Apache::DebugFilter::snoop_connection
-  PerlInputFilterHandler MyApache::Filter::input
+  PerlInputFilterHandler Apache2::DebugFilter::snoop_connection
+  PerlInputFilterHandler MyApache2::Filter::input
 
 This is because C<snoop_connection> is going to be invoked first and
-immediately call C<MyApache::Filter::input> the input filter for
+immediately call C<MyApache2::Filter::input> the input filter for
 data. Only when the latter returns, C<snoop_connection> will do its
 work.
 
@@ -173,8 +173,8 @@ normally it's configured for a specific 
 example:
 
   <Location /foo>
-      PerlInputFilterHandler  Apache::DebugFilter::snoop_request
-      PerlOutputFilterHandler Apache::DebugFilter::snoop_request
+      PerlInputFilterHandler  Apache2::DebugFilter::snoop_request
+      PerlOutputFilterHandler Apache2::DebugFilter::snoop_request
   </Location>
 
 
@@ -184,7 +184,7 @@ example:
 
 =head2 C<bb_dump()>
 
-  my $ra_data = Apache::DebugFilter::bb_dump($bb);
+  my $ra_data = Apache2::DebugFilter::bb_dump($bb);
 
 If only a bucket brigade C<$bb> is passed, C<bb_dump> will convert bb
 to an array of bucket_type => data pairs, and return a reference to
@@ -197,7 +197,7 @@ it. This later can be used as in the fol
 If the second argument (expected to be an open filehandle) is passed,
 as in:
 
-  Apache::DebugFilter::bb_dump($bb, \*STDERR);
+  Apache2::DebugFilter::bb_dump($bb, \*STDERR);
 
 C<bb_dump> will print pretty formatted bb's content to that
 filehandle.
@@ -226,7 +226,7 @@ L<perl>.
 
 =head1 Copyright
 
-The C<Apache::DebugFilter> module is free software; you can
+The C<Apache2::DebugFilter> module is free software; you can
 redistribute it and/or modify it under the same terms as Perl itself.
 
 =cut

Modified: Apache-DebugFilter/trunk/t/response/TestDebugFilter/bb_dump.pm
==============================================================================
--- Apache-DebugFilter/trunk/t/response/TestDebugFilter/bb_dump.pm	(original)
+++ Apache-DebugFilter/trunk/t/response/TestDebugFilter/bb_dump.pm	Sun Jul  3 18:08:32 2005
@@ -3,7 +3,7 @@ package TestDebugFilter::bb_dump;
 use strict;
 use warnings FATAL => 'all';
 
-use Apache::Connection ();
+use Apache2::Connection ();
 use APR::Bucket ();
 use APR::Brigade ();
 use APR::Util ();
@@ -11,30 +11,30 @@ use APR::Error ();
 
 use Apache::TestTrace;
 
-use Apache::DebugFilter;
+use Apache2::DebugFilter;
 
 use APR::Const -compile => qw(SUCCESS EOF);
-use Apache::Const -compile => qw(OK MODE_GETLINE);
+use Apache2::Const -compile => qw(OK MODE_GETLINE);
 
 sub handler {
-    my Apache::Connection $c = shift;
+    my Apache2::Connection $c = shift;
 
     my $ba  = $c->bucket_alloc;
     my $ibb = APR::Brigade->new($c->pool, $ba);
     my $obb = APR::Brigade->new($c->pool, $ba);
 
     for (;;) {
-        my $rv = $c->input_filters->get_brigade($ibb, Apache::MODE_GETLINE);
-        if ($rv != APR::SUCCESS or $ibb->is_empty) {
+        my $rv = $c->input_filters->get_brigade($ibb, Apache2::Const::MODE_GETLINE);
+        if ($rv != APR::Const::SUCCESS or $ibb->is_empty) {
             my $error = APR::Error::strerror($rv);
-            unless ($rv == APR::EOF) {
+            unless ($rv == APR::Const::EOF) {
                 warn "[echo_filter] get_brigade: $error\n";
             }
             $ibb->destroy;
             last;
         }
 
-        my $ra_data = Apache::DebugFilter::bb_dump($ibb);
+        my $ra_data = Apache2::DebugFilter::bb_dump($ibb);
         debug $ra_data;
 
         $ibb->destroy;
@@ -48,7 +48,7 @@ sub handler {
         $c->output_filters->pass_brigade($obb);
     }
 
-    Apache::OK;
+    Apache2::Const::OK;
 }
 
 1;

Modified: Apache-DebugFilter/trunk/t/response/TestDebugFilter/snoop.pm
==============================================================================
--- Apache-DebugFilter/trunk/t/response/TestDebugFilter/snoop.pm	(original)
+++ Apache-DebugFilter/trunk/t/response/TestDebugFilter/snoop.pm	Sun Jul  3 18:08:32 2005
@@ -76,18 +76,18 @@ __END__
 <NoAutoConfig>
   <VirtualHost TestDebugFilter::snoop>
       PerlModule             TestDebugFilter::snoop
-      PerlModule             Apache::DebugFilter
+      PerlModule             Apache2::DebugFilter
 
       # Connection snooping (everything)
-      PerlInputFilterHandler  Apache::DebugFilter::snoop_connection
-      PerlOutputFilterHandler Apache::DebugFilter::snoop_connection
+      PerlInputFilterHandler  Apache2::DebugFilter::snoop_connection
+      PerlOutputFilterHandler Apache2::DebugFilter::snoop_connection
 
       # HTTP Request snooping (only HTTP request body)
       <Location /TestDebugFilter__snoop>
           SetHandler modperl
           PerlResponseHandler     TestDebugFilter::snoop
-          PerlInputFilterHandler  Apache::DebugFilter::snoop_request
-          PerlOutputFilterHandler Apache::DebugFilter::snoop_request
+          PerlInputFilterHandler  Apache2::DebugFilter::snoop_request
+          PerlOutputFilterHandler Apache2::DebugFilter::snoop_request
       </Location>
   </VirtualHost>
 </NoAutoConfig>