metaperl has asked for the wisdom of the Perl Monks concerning the following question:

Is it possible to modify this Makefile.PL
use inc::Module::Install; name 'DBIx-Cookbook'; all_from 'lib/DBIx/Cookbook.pm'; author q{Terrence Brannon <metaperl@gmail.com>}; license 'perl'; author_tests('xt'); build_requires 'Test::More'; requires 'DBI'; requires 'MooseX::App::Cmd'; auto_install; WriteAll;
written with Module::Install such that "make pod" will run the Perl script etc/build_pod.pl

Replies are listed 'Best First'.
Re: Adding additional targets to Module::Install
by bingos (Vicar) on Apr 14, 2010 at 12:18 UTC

    You can use postamble to add things to the end of the generated Makefile

    postamble <<END_OF_MAKEFILE; pod: \t\$(PERL) etc/build_pod.pl END_OF_MAKEFILE

    So your Makefile.PL will look like:

    use inc::Module::Install; name 'DBIx-Cookbook'; all_from 'lib/DBIx/Cookbook.pm'; author q{Terrence Brannon <metaperl@gmail.com>}; license 'perl'; author_tests('xt'); build_requires 'Test::More'; requires 'DBI'; requires 'MooseX::App::Cmd'; auto_install; postamble <<END_OF_MAKEFILE; pod: \t\$(PERL) etc/build_pod.pl END_OF_MAKEFILE WriteAll;