From: Matt S Trout Date: Mon, 23 Nov 2009 21:45:45 +0000 (-0500) Subject: change filter_response to response_filter in the places I got it wrong X-Git-Tag: v0.003~41 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FWeb-Simple.git;a=commitdiff_plain;h=74afe4b70dc0f4b5f8de55fb4d17c4863d842c29 change filter_response to response_filter in the places I got it wrong --- diff --git a/examples/bloggery/bloggery.cgi b/examples/bloggery/bloggery.cgi index 2a05045..947180f 100755 --- a/examples/bloggery/bloggery.cgi +++ b/examples/bloggery/bloggery.cgi @@ -86,7 +86,7 @@ sub post { dispatch [ sub (.html) { - filter_response { $self->render_html($_[1]) }, + response_filter { $self->render_html($_[1]) }, }, sub (GET + /) { redispatch_to '/index.html'; diff --git a/lib/Web/Simple.pm b/lib/Web/Simple.pm index 01f6369..5e38ba8 100644 --- a/lib/Web/Simple.pm +++ b/lib/Web/Simple.pm @@ -30,7 +30,7 @@ sub _export_into { *{"${app_package}::dispatch"} = sub { $app_package->_setup_dispatcher(@_); }; - *{"${app_package}::filter_response"} = sub (&) { + *{"${app_package}::response_filter"} = sub (&) { $app_package->_construct_response_filter($_[0]); }; *{"${app_package}::redispatch_to"} = sub { @@ -148,7 +148,7 @@ It also exports the following subroutines: dispatch [ sub (...) { ... }, ... ]; - filter_response { ... }; + response_filter { ... }; redispatch_to '/somewhere'; @@ -421,7 +421,7 @@ will match and strip .html from the path (assuming the subroutine itself returns something, of course). This is normally used for rendering - e.g. sub (.html) { - filter_response { $self->render_html($_[1]) } + response_filter { $self->render_html($_[1]) } } Additionally,