On Wed, 2002-10-02 at 21:11, Geoffrey Young wrote:
> I thought that Doug had mentioned a few times that this functionality 
> was a mistake in 1.0 and deprecated in 2.0.  in fact, I thought it was 
> in the 2.0 docs someplace, but I couldn't find it.

I remember myself that it was mentionned and couldn't find it either.

> it doesn't matter to me, but in the case that it doesn't belong in 2.0 
> proper it should probably make it to the compat layer.

Something like this would do the trick I believe

Index: lib/Apache/compat.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.66
diff -u -b -B -r1.66 compat.pm
--- lib/Apache/compat.pm        24 Aug 2002 16:26:22 -0000      1.66
+++ lib/Apache/compat.pm        2 Oct 2002 15:35:44 -0000
@@ -218,6 +218,18 @@
     } split /[=&;]/, $string, -1;
 }
 
+{
+my $old_print;
+sub compat_print {
+    &$old_print( shift, map { (ref($_) eq 'SCALAR') ? $$_ : $_ } @_ );
+}
+if (not $old_print) {
+    no warnings;
+    $old_print = \&Apache::RequestRec::print;
+    *Apache::RequestRec::print = \&compat_print;
+}
+}
+
 #sorry, have to use $r->Apache::args at the moment
 #for list context splitting
 

Index: t/response/TestCompat/request.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/t/response/TestCompat/request.pm,v
retrieving revision 1.1
diff -u -b -B -r1.1 request.pm
--- t/response/TestCompat/request.pm    15 Aug 2002 09:35:11 -0000      1.1
+++ t/response/TestCompat/request.pm    2 Oct 2002 15:35:45 -0000
@@ -16,7 +16,7 @@
 sub handler {
     my $r = shift;
 
-    plan $r, tests => 15;
+    plan $r, tests => 16;
 
     $r->send_http_header('text/plain');
 
@@ -80,6 +80,7 @@
     $r->post_connection(sub { OK });
     ok 1;
 
+    $r->print(\"ok 16\n");
 
     OK;
 }
:



> --Geoff
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to