X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=blobdiff_plain;f=lib%2FCatalyst%2FComponent.pm;h=1b2d46201921ccf0b7b02543e530e27098191540;hp=a279cd77ed0d62d8b08c3ba184ce5c4a33eb00d9;hb=83e69a6b03e61e29f918144cff0b0562e2a92ec4;hpb=f0bb41afeb618a7abcaa5816b4cb9aa419be5066 diff --git a/lib/Catalyst/Component.pm b/lib/Catalyst/Component.pm index a279cd7..1b2d462 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'; @@ -147,6 +148,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; @@ -205,6 +211,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)