From: Marcus Ramberg Date: Mon, 19 Jan 2009 18:19:28 +0000 (+0000) Subject: Apply doc patch from dhoss X-Git-Tag: 5.8000_05~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=23c63a175ede6c6e335987707a6358f47549bdbc Apply doc patch from dhoss --- diff --git a/Changes b/Changes index ce591a5..22b0c88 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,7 @@ # This file documents the revision history for Perl extension Catalyst. 5.8000_05 + - Add docs for finalize hook (dhoss) - Added ru/ua translations to error page - Improve the clarity and verbosity of the warning when component resolution uses regex fallback. (jhannah) diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 9d3040b..4f92467 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1057,6 +1057,26 @@ EOF $class->setup_finalize; } + +=head2 $app->setup_finalize + +A hook to attach modifiers to. +Using C< after setup => sub{}; > doesn't work, because of quirky things done for plugin setup. +Also better than C< setup_finished(); >, as that is a getter method. + + sub setup_finalize { + + my $app = shift; + + ## do stuff, i.e., determine a primary key column for sessions stored in a DB + + $app->next::method(@_); + + + } + +=cut + sub setup_finalize { my ($class) = @_; $class->setup_finished(1);