Module::Recursive::Require - This class require module recursively.
# ************************************** before
use MyApp::Foo;
use MyApp::Foo::CGI;
use MyApp::Foo::Mail;
use MyApp::Foo::Mail::Send;
# use use use use use !!
use MyApp::Foo::Hoge::Orz;
# ************************************** after
use Module::Recursive::Require;
use MyApp::Foo;
my @required_packages
= Module::Recursive::Require->new()->require_by('MyApp::Foo');
use Module::Recursive::Require;
my $r = Module::Recursive::Require->new();
$r->first_loads(
qw/
MyApp::Foo::Boo
/
); # * It loads first.
$r->add_filter(qr/^Hoge/); # * Don't loaded qr/^Hoge/
$r->add_filter(qr/Base.pm$/); # * Don't loaded qr/Base.pm$/
my @packages = $r->require_of('MyApp::Foo');
# * or
my $packages_array_ref
= $r->require_of('MyApp::Foo');
%args = (
path => '/var/www/my/lib', # * default $INC[0]
extensions => 'pm' , # * default "pm" and "pl"
);
Deprecated. For backwards compatibility only.
Masahiro Funakoshi <masap@cpan.org>