ASPEER-MakeMaker
view release on metacpan or search on metacpan
lib/ASPEER/MakeMaker.pm.md view on Meta::CPAN
# ASPEER::MakeMaker
## Name
ASPEER::MakeMaker - parent entry point and shared make-target methods for MakeMaker plugins
## Synopsis
```perl
use ASPEER::MakeMaker;
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Some::Module',
VERSION_FROM => 'lib/Some/Module.pm',
);
```
```perl
use ASPEER::MakeMaker qw(const_config postamble);
```
## Description
`ASPEER::MakeMaker` is the public parent entry point for the distribution. It
sets version metadata, imports shared utility functions from
`ASPEER::MakeMaker::MM::Util`, and forwards import handling to
`ASPEER::MakeMaker::MM::Import`.
When imported without arguments, it requests the `const_config` and `postamble`
MakeMaker sections. The hook installer also enables `depend` and
`post_initialize`, which provide the standard dependency, install-map, and
Git-provenance behavior. Import handling is lazy-loaded and then delegated to
`ASPEER::MakeMaker::MM::Import`.
Child plugins inherit this class and provide a matching `<plugin>::MM` class
and `<plugin>::MM::Constant` package. The shared import layer then dispatches
the plugin's own targets while retaining the common lifecycle behavior. The
module also contains methods intended to be invoked by generated make targets.
## Methods
### import
```perl
use ASPEER::MakeMaker;
use ASPEER::MakeMaker qw(const_config postamble);
```
Enables MakeMaker section hooks. If no sections are supplied, `const_config`
and `postamble` are requested; `depend` and `post_initialize` are installed by
the hook manager as common defaults.
The implementation loads `ASPEER::MakeMaker::MM::Import` and forwards to
its `import` method.
### dump_param
```perl
ASPEER::MakeMaker->dump_param(@makemaker_args, @args);
```
Debugging method. It parses the MakeMaker-style argument list with `arg` and
prints the resulting hash using `Dumper`.
### util_sync
```perl
ASPEER::MakeMaker->util_sync(
@makemaker_args,
$source_file,
);
```
Copies one of this distribution's helper files into a consuming
distribution. The method expects the fixed MakeMaker argument block first,
followed by the source file path. The destination is not passed directly.
Instead, `util_sync` derives it from the parsed `TO_INST_PM` MakeMaker value.
The destination lookup uses the source basename and selects an installed module
path ending in:
```text
MM/<source basename>
```
( run in 2.198 seconds using v1.01-cache-2.11-cpan-16aabcbfbcb )