ASPEER-MakeMaker
view release on metacpan or search on metacpan
lib/ASPEER/MakeMaker/MM/Constant.pm view on Meta::CPAN
MM_PREFIX => 'ASPEER_MAKEMAKER',
ASPEER_MAKEMAKER_PM => 'ASPEER::MakeMaker',
TEMPLATE_POSTAMBLE_FN =>
File::Spec->catfile(dirname(__FILE__), 'postamble.inc'),
UPDATE_SOURCE_UTIL_FN =>
File::Spec->catfile(dirname(__FILE__), 'Util.pm'),
UPDATE_SOURCE_IMPORT_FN =>
File::Spec->catfile(dirname(__FILE__), 'Import.pm'),
ASPEER_MAKEMAKER_PM_ARGV => join(',', qw[
"$(NAME)"
"$(NAME_SYM)"
"$(DISTNAME)"
"$(DISTVNAME)"
"$(VERSION)"
"$(VERSION_SYM)"
"$(VERSION_FROM)"
"$(LICENSE)"
"$(AUTHOR)"
"$(TO_INST_PM)"
"$(EXE_FILES)"
"$(DIST_DEFAULT_TARGET)"
"$(SUFFIX)"
"$(ABSTRACT_FROM)"
]),
# Local constants override anything above
#
%{do($local_fn) || {}},
%{do(my($fn)=glob(sprintf('~/.%s.local', __PACKAGE__))) || {}} # || {} avoids warning
);
# Export constants to namespace, place in export tags
#
require Exporter;
@ISA=qw(Exporter);
{
no warnings qw(once);
foreach (keys %Constant) {${$_}=$Constant{$_}}
}
@EXPORT=map {'$' . $_} keys %Constant;
@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
$ASPEER_MAKEMAKER_PM_ARGV
);
```
```perl
use ASPEER::MakeMaker::MM::Constant qw(:all);
```
## Description
`ASPEER::MakeMaker::MM::Constant` defines constants used by the
MakeMaker hook layer and generated postamble targets.
The constants are stored in `%Constant`, exported as scalar package variables,
and copied into the Makefile macro table by
`ASPEER::MakeMaker::MM::Import::const_config`.
## Constants
### MM_PREFIX
Private prefix used when constructing this extension's Makefile macro names.
It is consumed by the hook implementation and is not emitted as the generic
Makefile macro `MM_PREFIX`. When omitted, the importing class name is
uppercased and `::` is replaced with `_`.
### ASPEER_MAKEMAKER_PM
The module name used by generated make targets when dispatching back into this
helper distribution.
Default:
```perl
ASPEER::MakeMaker
```
### TEMPLATE_POSTAMBLE_FN
Path to the bundled postamble template:
```text
lib/ASPEER/MakeMaker/MM/postamble.inc
```
### UPDATE_SOURCE_UTIL_FN
Path to this distribution's source `MM/Util.pm`. The `util_sync` target can use
this as the source file for utility synchronization.
lib/ASPEER/MakeMaker/MM/Constant.pm view on Meta::CPAN
- `$(VERSION_SYM)`
- `$(VERSION_FROM)`
- `$(LICENSE)`
- `$(AUTHOR)`
- `$(TO_INST_PM)`
- `$(EXE_FILES)`
- `$(DIST_DEFAULT_TARGET)`
- `$(SUFFIX)`
- `$(ABSTRACT_FROM)`
## Local Overrides
After defining built-in defaults, the module applies optional local overrides.
The override files must evaluate to a hash reference.
The files are loaded in this order:
1. A `.local` file beside `MM/Constant.pm`.
2. `~/.ASPEER::MakeMaker::MM::Constant.local`.
Later values override earlier values.
## Export Behavior
All constants are exported by default as scalar variables. They are also
available through the `:all` export tag. Loading the module does not alter the
caller's `$_` value.
## See Also
- `ASPEER::MakeMaker`
- `ASPEER::MakeMaker::MM::Import`
- `ASPEER::MakeMaker::MM::Util`
# AUTHOR
Andrew Speer <andrew.speer@isolutions.com.au>
# LICENSE and COPYRIGHT
This file is part of ASPEER::MakeMaker.
This software is copyright (c) 2026 by Andrew Speer <andrew.speer@isolutions.com.au>.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
Full license text is available at:
<http://dev.perl.org/licenses/>
=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
$UPDATE_SOURCE_CONSTANT_FN
$ASPEER_MAKEMAKER_PM_ARGV
);
use ASPEER::MakeMaker::MM::Constant qw(:all);
=head2 Description
C<ASPEER::MakeMaker::MM::Constant> defines constants used by the
MakeMaker hook layer and generated postamble targets.
The constants are stored in C<%Constant>, exported as scalar package variables,
and copied into the Makefile macro table by
C<ASPEER::MakeMaker::MM::Import::const_config>.
=head2 Constants
=head3 MM_PREFIX
Private prefix used when constructing this extension's Makefile macro names.
It is consumed by the hook implementation and is not emitted as the generic
Makefile macro C<MM_PREFIX>. When omitted, the importing class name is
uppercased and C<::> is replaced with C<_>.
=head3 ASPEER_MAKEMAKER_PM
The module name used by generated make targets when dispatching back into this
helper distribution.
Default:
ASPEER::MakeMaker
=head3 TEMPLATE_POSTAMBLE_FN
Path to the bundled postamble template:
lib/ASPEER/MakeMaker/MM/postamble.inc
=head3 UPDATE_SOURCE_UTIL_FN
Path to this distribution's source C<MM/Util.pm>. The C<util_sync> target can use
this as the source file for utility synchronization.
( run in 2.886 seconds using v1.01-cache-2.11-cpan-16aabcbfbcb )