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

Hello, I am using Module::Install to build a MakeMaker-style Makefile.PL

I have some additional behavior coded up in a make target called sakila:

postamble <<EOPOST; sakila: ./etc/install_sakila.pl EOPOST
that I would like to run when "make" is run on this unpacked distribution. How can I have "make sakila" run when a user (or CPAN.pm) runs "make" on this distribution?





The mantra of every experienced web application developer is the same: thou shalt separate business logic from display. Ironically, almost all template engines allow violation of this separation principle, which is the very impetus for HTML template engine development.

-- Terence Parr, "Enforcing Strict Model View Separation in Template Engines"

Replies are listed 'Best First'.
Re: custom behavior with Module::Install/MakeMaker during standard CPAN install sequence
by bingos (Vicar) on May 08, 2010 at 16:04 UTC

    You can do it by amending your postamble slightly and adding sakila to the all target which is what is run when you simply type make:

    postamble <<EOPOST; all :: sakila sakila: ./etc/install_sakila.pl EOPOST