On 5 August 2011 02:12, Feng He <short...@gmail.com> wrote: > Hi, > > I have wrote a module and released it with module-starter. > (http://search.cpan.org/~xsawyerx/Module-Starter-1.58/lib/Module/Starter.pm) > > When I install it from the CPAN shell, how can I make the shell > install the prerequisite modules automatically? > > for example, my module: > > package ABC; > use MIME::Lite; > > ... > 1;
If the Makefile.PL for you module has "requires MIME::Lite" in then the end user will get a warning about the lack of a dependency. You can not force the required modules to install on an end user's machine. That will be down to how the end user configured their CPAN. Their cpan config will have a line for 'prerequisites_policy'. Possible values include ask or follow. If it follow, then the prerequisites are downloaded and installed. Otherwise it will ask the user if they want to install the required modules. HTH, Dp. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/