dependencies => [
depends_on( '/application_name' ),
],
- )
+ ),
);
+ # XXX - FIXME - We have to explicitly build the service here,
+ # causing the COMPONENT method to be called early here, as otherwise
+ # if the component method defines other classes (e.g. the
+ # ACCEPT_CONTEXT injection Model::DBIC::Schema does)
+ # then they won't be found by Devel::InnerPackage
+ # see also t/aggregate/unit_core_component_loading.t
+ $instance_container->get_service($component_service_name)->get;
$accept_context_container->add_service(
Catalyst::IOC::BlockInjection->new(
is($@, '', "Didn't load component twice");
is($appclass->model('TopLevel::Nested')->called,1, 'COMPONENT called once');
-# FIXME - OMG why should this even work?!!
+# FIXME we need a much better way of components being able to generate
+# sub-components of themselves (e.g. bring back expand_component_modules?)
+# as otherwise we _have_ to construct / call the COMPONENT method
+# explicitly to get all the sub-components built for Devel::InnerPackage
+# to find them. See FIXME in Catalyst::IOC::Container
ok($appclass->model('TopLevel::GENERATED'), 'Have generated model');
is(ref($appclass->model('TopLevel::GENERATED')), 'FooBarBazQuux',
'ACCEPT_CONTEXT in generated inner package fired as expected');