use ExtUtils::MakeMaker; WriteMakefile( NAME => 'BeastBB', VERSION => '0.1', INST_SCRIPT => './bin', INST_BIN => './bin', test => { TESTS => 't/*.t t/*/*.t' }, ); package MY { sub install { my $self = shift; my $return = $self->SUPER::install(@_); $return = [ split /\n/, $return ]; for my $i ( keys @$return ) { $return->[$i] =~ s/::/:: install_frontend_and_migrations/ if $return->[$i] =~ /^install :/; } return join "\n", @$return; } sub postamble { return "\n" . "install_frontend_and_migrations:\n" . "\tif [ ! -e lib/BeastBB/public ]; then " . "mkdir -pv lib/BeastBB/public; " . "fi;" . "if [ ! -e lib/BeastBB/templates ]; then " . "mkdir -pv lib/BeastBB/templates; " . "fi; " . "if [ ! -e lib/BeastBB/migrations ]; then " . "mkdir -pv lib/BeastBB/migrations; " . "fi; " . "cp -rfv templates/* lib/BeastBB/templates/; " . "cp -rfv public/* lib/BeastBB/public/; " . "cp -rfv migrations/* lib/BeastBB/migrations/; "; } }