[Catalyst-commits] r10962 - in Catalyst-Runtime/5.80/trunk: . t

hobbs at dev.catalyst.perl.org hobbs at dev.catalyst.perl.org
Thu Jul 23 09:32:10 GMT 2009


Author: hobbs
Date: 2009-07-23 09:32:08 +0000 (Thu, 23 Jul 2009)
New Revision: 10962

Modified:
   Catalyst-Runtime/5.80/trunk/Changes
   Catalyst-Runtime/5.80/trunk/t/unit_core_component_loading.t
Log:
Test and Changelog entry for r10961.


Modified: Catalyst-Runtime/5.80/trunk/Changes
===================================================================
--- Catalyst-Runtime/5.80/trunk/Changes	2009-07-23 04:46:43 UTC (rev 10961)
+++ Catalyst-Runtime/5.80/trunk/Changes	2009-07-23 09:32:08 UTC (rev 10962)
@@ -5,6 +5,9 @@
          application class immutable without that option.
        - Fix POD to refer to ->config(key => $val), rather than
          ->config->{key} = $val, as the latter form is deprecated.
+       - Depend on Module::Pluggable 3.9 to prevent a bug wherein components
+         in inner packages might not be registered. This especially affected
+         tests.
 
   Refactoring / cleanups:
        - Deleted the Restarter engine and its Watcher code. Use the

Modified: Catalyst-Runtime/5.80/trunk/t/unit_core_component_loading.t
===================================================================
--- Catalyst-Runtime/5.80/trunk/t/unit_core_component_loading.t	2009-07-23 04:46:43 UTC (rev 10961)
+++ Catalyst-Runtime/5.80/trunk/t/unit_core_component_loading.t	2009-07-23 09:32:08 UTC (rev 10962)
@@ -1,7 +1,8 @@
 # 2 initial tests, and 6 per component in the loop below
 # (do not forget to update the number of components in test 3 as well)
 # 5 extra tests for the loading options
-use Test::More tests => 2 + 6 * 24 + 5;
+# One test for components in inner packages
+use Test::More tests => 2 + 6 * 24 + 5 + 1;
 
 use strict;
 use warnings;
@@ -199,4 +200,17 @@
 
 is($@, '', "Didn't load component twice");
 
+$appclass = "InnerComponent";
+
+{
+  package InnerComponent::Controller::Test;
+  use base 'Catalyst::Controller';
+}
+
+$INC{'InnerComponent/Controller/Test.pm'} = 1;
+
+eval "package $appclass; use Catalyst; __PACKAGE__->setup";
+
+isa_ok($appclass->controller('Test'), 'Catalyst::Controller');
+
 rmtree($libdir);




More information about the Catalyst-commits mailing list