X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FComponent.pm;fp=lib%2FCatalyst%2FComponent.pm;h=bccd3f951005e26166160d607c94d84abc1c1e69;hp=5e8a94c5a2e6f0508cb8200ff76ab3f321e86c6e;hb=5d02e7902fb093a28deeea34bd4bd8a729e78be4;hpb=7d6820cc9cd445e7a3d0c3094584a5eb31f60eb1 diff --git a/lib/Catalyst/Component.pm b/lib/Catalyst/Component.pm index 5e8a94c..bccd3f9 100644 --- a/lib/Catalyst/Component.pm +++ b/lib/Catalyst/Component.pm @@ -5,6 +5,7 @@ use Class::MOP; use Class::MOP::Object; use Catalyst::Utils; use Class::C3::Adopt::NEXT; +use Devel::InnerPackage (); use MRO::Compat; use mro 'c3'; use Scalar::Util 'blessed'; @@ -149,6 +150,11 @@ sub process { . " did not override Catalyst::Component::process" ); } +sub expand_modules { + my ($class, $component) = @_; + return Devel::InnerPackage::list_packages( $component ); +} + __PACKAGE__->meta->make_immutable; 1; @@ -207,6 +213,13 @@ when you forward to them. The default is an abstract method. Merges two hashes together recursively, giving right-hand precedence. Alias for the method in L. +=head2 $c->expand_modules( $setup_component_config ) + +Return a list of extra components that this component has created. By default, +it just looks for a list of inner packages of this component + +=cut + =head1 OPTIONAL METHODS =head2 ACCEPT_CONTEXT($c, @args)