view release on metacpan or search on metacpan
CONTRIBUTING.md view on Meta::CPAN
# Contributing to ASPEER::MakeMaker
Bug reports and focused contributions are welcome. Search the
[GitHub issues](https://github.com/aspeer/pm-ASPEER-MakeMaker/issues) before
opening a new one, and include a minimal reproduction where possible.
Fork the [GitHub repository](https://github.com/aspeer/pm-ASPEER-MakeMaker),
create a topic branch, keep changes focused, and submit a GitHub pull request.
Run `perl Makefile.PL`, `make test`, and `make disttest` before submitting.
Do not include credentials or private data. Report potential vulnerabilities
privately as described in [SECURITY.md](SECURITY.md).
Revision history for ASPEER-MakeMaker
1.012 2026-09-26
- Publish public repository metadata through the GitHub mirror.
- Add contributor and security policies, dependency auditing and
artifact-attestation verification guidance.
- Declare the CPAN authority in distribution metadata.
1.011 2026-09-26
- Consolidate the shared MakeMaker lifecycle and utility layer.
- Preserve extension chaining and generated Makefile targets.
- Add distribution documentation and integration coverage.
- Prepare the consolidated distribution for its first CPAN release.
lib/ASPEER/MakeMaker/MM/Util.pm.md
LICENSE
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
README
README.md
SECURITY.md
t/02-mm-integration.t
t/ASPEER-MakeMaker.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
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
```perl
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
SECURITY.md view on Meta::CPAN
Please include enough detail to reproduce and assess the issue, including:
- the affected ASPEER::MakeMaker version
- the affected Perl version and operating system, if relevant
- a proof of concept, test case, or reproduction steps
- relevant logs, code snippets, configuration, or request/response examples
- whether the issue is known to be actively exploited
- whether you want public credit when the issue is disclosed
Do not include passwords, tokens, private keys, personal data, or other
sensitive information in the report unless it is strictly necessary and safe
to share with the maintainers.
If you would like help triaging the issue, need CVE coordination, cannot reach
the maintainer, or believe the issue is being actively exploited, you may also
copy the CPAN Security Group (CPANSec):
cpan-security@security.metacpan.org
For signs of a compromised CPAN/PAUSE account, contact the PAUSE
lib/ASPEER/MakeMaker.pm view on Meta::CPAN
);
```
```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
lib/ASPEER/MakeMaker.pm view on Meta::CPAN
WriteMakefile(
NAME => 'Some::Module',
VERSION_FROM => 'lib/Some/Module.pm',
);
use ASPEER::MakeMaker qw(const_config postamble);
=head2 Description
C<ASPEER::MakeMaker> is the public parent entry point for the distribution. It
sets version metadata, imports shared utility functions from
C<ASPEER::MakeMaker::MM::Util>, and forwards import handling to
C<ASPEER::MakeMaker::MM::Import>.
When imported without arguments, it requests the C<const_config> and C<postamble>
MakeMaker sections. The hook installer also enables C<depend> and
C<post_initialize>, which provide the standard dependency, install-map, and
Git-provenance behavior. Import handling is lazy-loaded and then delegated to
C<ASPEER::MakeMaker::MM::Import>.
Child plugins inherit this class and provide a matching C<<< <plugin>::MM >>> class
lib/ASPEER/MakeMaker.pm.md view on Meta::CPAN
);
```
```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
lib/ASPEER/MakeMaker/MM/Constant.pm view on Meta::CPAN
@EXPORT_OK=@EXPORT;
%EXPORT_TAGS=(all => [@EXPORT_OK]);
__END__
=begin markdown
# ASPEER::MakeMaker::MM::Constant
## Name
ASPEER::MakeMaker::MM::Constant - exported constants and Makefile macro data
## Synopsis
```perl
use ASPEER::MakeMaker::MM::Constant qw(
$ASPEER_MAKEMAKER_PM
$TEMPLATE_POSTAMBLE_FN
$UPDATE_SOURCE_UTIL_FN
$UPDATE_SOURCE_IMPORT_FN
$UPDATE_SOURCE_CONSTANT_FN
lib/ASPEER/MakeMaker/MM/Constant.pm view on Meta::CPAN
=end markdown
=head1 ASPEER::MakeMaker::MM::Constant
=head2 Name
ASPEER::MakeMaker::MM::Constant - exported constants and Makefile macro data
=head2 Synopsis
use ASPEER::MakeMaker::MM::Constant qw(
$ASPEER_MAKEMAKER_PM
$TEMPLATE_POSTAMBLE_FN
$UPDATE_SOURCE_UTIL_FN
$UPDATE_SOURCE_IMPORT_FN
lib/ASPEER/MakeMaker/MM/Constant.pm.md view on Meta::CPAN
# ASPEER::MakeMaker::MM::Constant
## Name
ASPEER::MakeMaker::MM::Constant - exported constants and Makefile macro data
## Synopsis
```perl
use ASPEER::MakeMaker::MM::Constant qw(
$ASPEER_MAKEMAKER_PM
$TEMPLATE_POSTAMBLE_FN
$UPDATE_SOURCE_UTIL_FN
$UPDATE_SOURCE_IMPORT_FN
$UPDATE_SOURCE_CONSTANT_FN
lib/ASPEER/MakeMaker/MM/Import.pm view on Meta::CPAN
# Update macros with our config
#
next if $key eq 'MM_PREFIX';
my $value=$constant_hr->{$key};
msg("add macro: $key, value: $value");
$mm_or->{'macro'}{$key}=$value;
}
# Update license data. Get license type and author
#
my $license=$mm_or->{'LICENSE'};
my @author=@{$mm_or->{'AUTHOR'} || []};
my $author=shift(@author);
# Publish supplied values and enrich complete license metadata
#
$mm_or->{'macro'}{'LICENSE'}=$license if defined($license) && length($license);
$mm_or->{'macro'}{'AUTHOR'}=$author if defined($author) && length($author);
if ($license && $author) {
my @license_module=Software::LicenseUtils->guess_license_from_meta_key($license);
@license_module ||
return err("unable to determine correct license module from string: $license");
(@license_module > 1) &&
return err("ambiguous license string: $license, resolves to %s", join(',', @license_module));
my $license_or=(shift @license_module)->new({holder => $author});
lib/ASPEER/MakeMaker/MM/Import.pm view on Meta::CPAN
```perl
ASPEER::MakeMaker::MM::Import::const_config($hook, $mm, @args);
```
Calls the original MakeMaker `const_config`, then copies constants from
`ASPEER::MakeMaker::MM::Constant` into the Makefile macro table.
`MM_PREFIX` is private hook configuration and is not emitted as a Makefile
macro.
It publishes supplied license metadata:
- copies `LICENSE` and the first `AUTHOR` into the macro table when supplied
- uses `Software::LicenseUtils` to resolve the license when both are supplied
- writes the resulting URL into `META_MERGE.resources.license`
Neither `LICENSE` nor `AUTHOR` is required by this helper.
The method then installs a global `PERLRUN` command which preserves loaded
MakeMaker extensions and local include paths. Include arguments are quoted
through the active MakeMaker implementation. It also stores `DIST_DEFAULT` in
lib/ASPEER/MakeMaker/MM/Import.pm view on Meta::CPAN
=head3 const_config
ASPEER::MakeMaker::MM::Import::const_config($hook, $mm, @args);
Calls the original MakeMaker C<const_config>, then copies constants from
C<ASPEER::MakeMaker::MM::Constant> into the Makefile macro table.
C<MM_PREFIX> is private hook configuration and is not emitted as a Makefile
macro.
It publishes supplied license metadata:
=over
=item -
copies C<LICENSE> and the first C<AUTHOR> into the macro table when supplied
=item -
lib/ASPEER/MakeMaker/MM/Import.pm.md view on Meta::CPAN
```perl
ASPEER::MakeMaker::MM::Import::const_config($hook, $mm, @args);
```
Calls the original MakeMaker `const_config`, then copies constants from
`ASPEER::MakeMaker::MM::Constant` into the Makefile macro table.
`MM_PREFIX` is private hook configuration and is not emitted as a Makefile
macro.
It publishes supplied license metadata:
- copies `LICENSE` and the first `AUTHOR` into the macro table when supplied
- uses `Software::LicenseUtils` to resolve the license when both are supplied
- writes the resulting URL into `META_MERGE.resources.license`
Neither `LICENSE` nor `AUTHOR` is required by this helper.
The method then installs a global `PERLRUN` command which preserves loaded
MakeMaker extensions and local include paths. Include arguments are quoted
through the active MakeMaker implementation. It also stores `DIST_DEFAULT` in
t/02-mm-integration.t view on Meta::CPAN
unlike($makefile, qr/(?:gherkin|foobar|serfin)/,
'generated Makefile contains no demonstration targets');
like($makefile, qr/^EXE_FILES\s*=\s*bin\/sample\.pl$/m,
'executable retains its declared filename');
ok(!-e 'bin/sample', 'extensionless executable is not created implicitly');
unlike($makefile, qr/lib\/Sample\.pm\.(?:md|new|1)\s+blib\//,
'documentation and temporary sidecars are excluded from install map');
like($makefile, qr/'LICENSE'\s+'\$\(INST_LIBDIR\)/,
'license file is included in install map');
like(slurp('MYMETA.json'), qr/"license"\s*:\s*\[/,
'license metadata is generated');
my $make=$Config{'make'} || 'make';
is(system($make, 'dump_param'), 0,
'generated method-dispatch target executes successfully');
if (length($git_sha)) {
is(slurp('lib/Sample.pm.sha'), "$git_sha\n",
'Git-SHA provenance is generated');
like($makefile, qr/lib\/Sample\.pm\.sha/,
'Git-SHA provenance is included in install map');
utime(1000000000, 1000000000, 'lib/Sample.pm.sha') ||
t/02-mm-integration.t view on Meta::CPAN
$makefile=slurp('Makefile');
my @util_sync_target=($makefile=~/^util_sync ::\s*$/mg);
is(scalar(@util_sync_target), 1, 'embedded activation generates one util_sync target');
is(system($^X, '-MASPEER::MakeMaker', 'Makefile.PL'), 0,
'command-line and embedded activation succeed together');
$makefile=slurp('Makefile');
@util_sync_target=($makefile=~/^util_sync ::\s*$/mg);
is(scalar(@util_sync_target), 1, 'combined activation generates one util_sync target');
# Executable provenance is installed as data, not another executable
#
blurp_test('Makefile.PL', <<'MAKEFILE_PL');
use strict;
use warnings;
use ExtUtils::MakeMaker;
WriteMakefile(
NAME => 'Sample',
VERSION_FROM => 'bin/sample.pl',
EXE_FILES => ['bin/sample.pl'],
);
t/02-mm-integration.t view on Meta::CPAN
VERSION => '0.001',
);
MAKEFILE_PL
is(system($^X, '-MASPEER::MakeMaker', 'Makefile.PL'), 0,
'Makefile.PL succeeds without VERSION_FROM');
ok(!-e '.sha', 'Git-SHA provenance is not created without VERSION_FROM');
chdir($cwd) || die("unable to chdir $cwd, $!");
# File writes must report both data and close failures
#
{
no warnings qw(redefine);
local *IO::File::new=sub {bless({}, 'Local::FailingWrite')};
my $write_ok=eval {
ASPEER::MakeMaker::MM::Util::blurp('ignored', 'text');
1;
};
ok(!$write_ok, 'file write failure is fatal');
}