NAME
Module::Recursive::Require - This class require module recursively.
DESCRIPTION
# ************************************** 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');
SYNOPSIS
use Module::Recursive::Require;
my $r = Module::Recursive::Require->new();
$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_by('MyApp::Foo');
# * or
my $packages_array_ref
= $r->require_by('MyApp::Foo');
METHOD
new( \%args )
%args = (
path => '/var/www/my/lib', # * default $INC[0]
extensions => 'pm' , # * default "pm" and "pl"
);
add_filter(qr/regexp/)
require_by( 'MyApp::Foo' );
SEE ALSO
AUTHOR
Masahiro Funakoshi <mfunakoshi+cpan@gmail.com>