From: John Napiorkowski Date: Thu, 30 Jan 2014 16:45:15 +0000 (-0600) Subject: make class method chaining off setup possible X-Git-Tag: 5.90060~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=a9dc0c7e5d5448de3f00c927354919350282f2cf make class method chaining off setup possible --- diff --git a/Changes b/Changes index 40aaab7..aa47ccf 100644 --- a/Changes +++ b/Changes @@ -3,6 +3,9 @@ - Announcing the repo is now open for development of Perl Catalyst 'Runner' - http://questhub.io/realm/perl/explore/latest/tag/runner +5.90059_005 - TBA + - MyApp->setup now returns $app to allow class method chaining. + 5.90059_005 - 2014-01-28 - Specify newested versions of some middleware in attempt to solve test errors reported while installing. diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index e3d705a..0d8cc77 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -1254,7 +1254,7 @@ EOF # Should be the last thing we do so that user things hooking # setup_finalize can log.. $class->log->_flush() if $class->log->can('_flush'); - return 1; # Explicit return true as people have __PACKAGE__->setup as the last thing in their class. HATE. + return $class || 1; # Explicit return true as people have __PACKAGE__->setup as the last thing in their class. HATE. } =head2 $app->setup_finalize