If I have a distribution with X and X::Y also in it, how do I make Module::Build install both the modules? I have put X.pm in lib, written a file Build.PL with the line
my $build = Module::Build->new
(
module_name => "X",
);
This installs X OK, but how do I tell Module::Build to also include X::Y in the distribution?
Module::Build should automatically find and install both modules, though you should indicate to it (in Build.PL) which one the distribution name/version is taken from.
Try creating your distribution with module-starter and let it worry about the details?