ASPEER-MakeMaker
view release on metacpan or search on metacpan
use ASPEER::MakeMaker qw(const_config postamble);
```
The generated postamble dispatches make targets back into the module through a
MakeMaker-generated command using the global `PERLRUN` value. Local include
paths are quoted for the platform shell. The target method receives a fixed
MakeMaker argument block first, followed by any target-specific arguments.
The Makefile retains any existing dependencies and also depends on
`VERSION_FROM`. License metadata is enriched when both `LICENSE` and `AUTHOR`
are supplied, but neither field is mandatory.
During post-initialization, documentation and temporary source files are
removed from the install map. If Git and `VERSION_FROM` are available, a
matching `.sha` provenance file is updated only when its content changes and is
installed beside the module or script. Executable filenames are always kept as
declared in `EXE_FILES`.
## Plugin Inheritance
A plugin inherits the public entry point and MakeMaker namespace, imports the
shared utility functions, and supplies its own constants and target methods:
```perl
package ASPEER::MakeMaker::Example;
use ASPEER::MakeMaker ();
use ASPEER::MakeMaker::Example::MM ();
use vars qw(@ISA);
@ISA=qw(ASPEER::MakeMaker);
```
```perl
package ASPEER::MakeMaker::Example::MM;
use ASPEER::MakeMaker::MM ();
use ASPEER::MakeMaker::MM::Util;
use vars qw(@ISA);
@ISA=qw(ASPEER::MakeMaker::MM);
```
The shared import layer reads the importing plugin's `MM::Constant` package and
postamble template. This gives each plugin its own Makefile macro prefix and
targets while retaining the common lifecycle hooks and additive `PERLRUN`
behavior.
## Generated Targets
The parent's bundled postamble defines `util_sync`. That target calls the
module's `util_sync` method twice:
- once for `Util.pm`
- once for `Import.pm`
After each copy, the target rewrites occurrences of `ASPEER::MakeMaker`
in the destination file to the consuming distribution's `$(NAME)`.
The destination is derived from the consuming distribution's `TO_INST_PM`
install map. Current child plugins inherit these modules directly and do not
run `util_sync`; the target remains available for a future vendoring or
standalone maintenance use case.
## Local Overrides
`ASPEER::MakeMaker::MM::Constant` loads default constants from the module and
then applies optional local overrides from:
- a `.local` file next to `Constant.pm`
- `~/.ASPEER::MakeMaker::MM::Constant.local`
Each override file is expected to evaluate to a hash reference.
## Documentation Map
The module-level sidecar documents describe the individual pieces:
- `lib/ASPEER/MakeMaker.pm.md`
- `lib/ASPEER/MakeMaker/MM/Import.pm.md`
- `lib/ASPEER/MakeMaker/MM.pm.md`
- `lib/ASPEER/MakeMaker/MM/Util.pm.md`
- `lib/ASPEER/MakeMaker/MM/Constant.pm.md`
## Notes
This module modifies `ExtUtils::MakeMaker` behavior by replacing selected
`ExtUtils::MM::*` methods at import time. It should therefore be loaded as part
of Makefile generation, not as a general runtime dependency.
The distribution requires Perl 5.8 or later.
( run in 1.110 second using v1.01-cache-2.11-cpan-10df4c37326 )