[Catalyst-commits] r11029 -
Catalyst-Plugin-RunAfterRequest/trunk/lib/Catalyst/Plugin
rafl at dev.catalyst.perl.org
rafl at dev.catalyst.perl.org
Wed Aug 5 12:59:03 GMT 2009
Author: rafl
Date: 2009-08-05 12:59:02 +0000 (Wed, 05 Aug 2009)
New Revision: 11029
Modified:
Catalyst-Plugin-RunAfterRequest/trunk/lib/Catalyst/Plugin/RunAfterRequest.pm
Log:
Make mxah provide _run_code_after_request.
Modified: Catalyst-Plugin-RunAfterRequest/trunk/lib/Catalyst/Plugin/RunAfterRequest.pm
===================================================================
--- Catalyst-Plugin-RunAfterRequest/trunk/lib/Catalyst/Plugin/RunAfterRequest.pm 2009-08-05 12:56:11 UTC (rev 11028)
+++ Catalyst-Plugin-RunAfterRequest/trunk/lib/Catalyst/Plugin/RunAfterRequest.pm 2009-08-05 12:59:02 UTC (rev 11029)
@@ -16,6 +16,14 @@
provides => {
push => 'run_after_request',
},
+ curries => {
+ map => {
+ _run_code_after_request => sub {
+ my ($self, $body) = @_;
+ $self->$body(sub { $self->$_ });
+ },
+ },
+ },
);
after finalize => sub {
@@ -23,11 +31,6 @@
$self->_run_code_after_request;
};
-sub _run_code_after_request {
- my $self = shift;
- $_->($self) for @{ $self->_callbacks };
-}
-
=head1 NAME
Catalyst::Plugin::RunAfterRequest - run code after the response has been sent.
More information about the Catalyst-commits
mailing list