Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Makefile.PL for Module::Install

Makefile.PL Module::Install

use strict;
use warnings;

use inc::Module::Install;

name     'MyTools';
license  'perl';
author   'Foo Bar';
all_from 'lib/MyTools.pm';

requires 'Exporter'   => '0';

test_requires 'Test::Simple' => '1.00';

WriteAll;

In Module::Install the declaration is cleaner and it does not need to be installed on the target machine. When running perl Makefile.PL it creates and inc subdirectory and copies itself there. One should distribute this directory as well.

On the target system Module::Install is loaded from this subdirectory.

$ perl Makefile.PL
$ make
$ make test
$ make manifest
$ make dist