Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Dev

[PATCH] post_connection() = register_cleanup()

 

 

ModPerl dev RSS feed   Index | Next | Previous | View Threaded


geoff at modperlcookbook

Oct 14, 2002, 6:16 AM

Post #1 of 2 (643 views)
Permalink
[PATCH] post_connection() = register_cleanup()

here's a patch for the post_connection() stuff I mentioned last week.
I also added a test, though neither really test much.

--Geoff

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 -r1.1 request.pm
--- t/response/TestCompat/request.pm 15 Aug 2002 09:35:11 -0000
1.1
+++ t/response/TestCompat/request.pm 14 Oct 2002 13:13:42 -0000
@@ -16,7 +16,7 @@
sub handler {
my $r = shift;

- plan $r, tests => 15;
+ plan $r, tests => 16;

$r->send_http_header('text/plain');

@@ -78,6 +78,8 @@

# post_connection()
$r->post_connection(sub { OK });
+ ok 1;
+ $r->register_cleanup(sub { OK });
ok 1;


Index: lib/Apache/compat.pm
===================================================================
RCS file: /home/cvspublic/modperl-2.0/lib/Apache/compat.pm,v
retrieving revision 1.68
diff -u -r1.68 compat.pm
--- lib/Apache/compat.pm 7 Oct 2002 05:04:13 -0000 1.68
+++ lib/Apache/compat.pm 14 Oct 2002 13:13:43 -0000
@@ -205,9 +205,7 @@
shift->pool->cleanup_register(@_);
}

-sub post_connection {
- shift->connection->pool->cleanup_register(@_);
-}
+*post_connection = \&register_cleanup;

sub get_remote_host {
my($r, $type) = @_;


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl


dougm at covalent

Oct 21, 2002, 1:06 PM

Post #2 of 2 (626 views)
Permalink
Re: [PATCH] post_connection() = register_cleanup() [In reply to]

On Mon, 14 Oct 2002, Geoffrey Young wrote:

> here's a patch for the post_connection() stuff I mentioned last week.
> I also added a test, though neither really test much.

that's in now, thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe [at] perl
For additional commands, e-mail: dev-help [at] perl

ModPerl dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.