make class method chaining off setup possible
John Napiorkowski [Thu, 30 Jan 2014 16:45:15 +0000 (10:45 -0600)]
Changes
lib/Catalyst.pm

diff --git a/Changes b/Changes
index 40aaab7..aa47ccf 100644 (file)
--- 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.
index e3d705a..0d8cc77 100644 (file)
@@ -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