ASPEER-MakeMaker

 view release on metacpan or  search on metacpan

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/Import.pm  view on Meta::CPAN

MakeMaker extensions and local include paths. Include arguments are quoted
through the active MakeMaker implementation. It also stores `DIST_DEFAULT` in
the `DIST_DEFAULT_TARGET` macro.

### depend

```perl
ASPEER::MakeMaker::MM::Import::depend($hook, $mm, @args);
```

Calls the original MakeMaker `depend` section. When `VERSION_FROM` is set, it
appends the following dependency unless it is already present:

```make
Makefile : $(VERSION_FROM)
```

### postamble

```perl
ASPEER::MakeMaker::MM::Import::postamble($hook, $mm, @args);

lib/ASPEER/MakeMaker/MM/Import.pm  view on Meta::CPAN

The method then installs a global C<PERLRUN> command which preserves loaded
MakeMaker extensions and local include paths. Include arguments are quoted
through the active MakeMaker implementation. It also stores C<DIST_DEFAULT> in
the C<DIST_DEFAULT_TARGET> macro.


=head3 depend


 ASPEER::MakeMaker::MM::Import::depend($hook, $mm, @args);
Calls the original MakeMaker C<depend> section. When C<VERSION_FROM> is set, it
appends the following dependency unless it is already present:


 Makefile : $(VERSION_FROM)

=head3 postamble


 ASPEER::MakeMaker::MM::Import::postamble($hook, $mm, @args);
Calls the original MakeMaker C<postamble>, then appends the template named by

lib/ASPEER/MakeMaker/MM/Import.pm.md  view on Meta::CPAN

MakeMaker extensions and local include paths. Include arguments are quoted
through the active MakeMaker implementation. It also stores `DIST_DEFAULT` in
the `DIST_DEFAULT_TARGET` macro.

### depend

```perl
ASPEER::MakeMaker::MM::Import::depend($hook, $mm, @args);
```

Calls the original MakeMaker `depend` section. When `VERSION_FROM` is set, it
appends the following dependency unless it is already present:

```make
Makefile : $(VERSION_FROM)
```

### postamble

```perl
ASPEER::MakeMaker::MM::Import::postamble($hook, $mm, @args);

lib/ASPEER/MakeMaker/MM/Util.pm  view on Meta::CPAN


### debug_enable

```perl
debug_enable($value);
```

Sets the debug flag used by `debug`.

The module also enables debug mode at load time if an environment variable
named after the current script plus `_DEBUG` is set.

### msg

```perl
msg('message %s', $value);
```

Prints a formatted message to standard error unless quiet mode is enabled.

### verbose

lib/ASPEER/MakeMaker/MM/Util.pm  view on Meta::CPAN

Enables verbose output for C<verbose>.


=head3 debug_enable


 debug_enable($value);
Sets the debug flag used by C<debug>.

The module also enables debug mode at load time if an environment variable
named after the current script plus C<_DEBUG> is set.


=head3 msg


 msg('message %s', $value);
Prints a formatted message to standard error unless quiet mode is enabled.


=head3 verbose

lib/ASPEER/MakeMaker/MM/Util.pm.md  view on Meta::CPAN


### debug_enable

```perl
debug_enable($value);
```

Sets the debug flag used by `debug`.

The module also enables debug mode at load time if an environment variable
named after the current script plus `_DEBUG` is set.

### msg

```perl
msg('message %s', $value);
```

Prints a formatted message to standard error unless quiet mode is enabled.

### verbose

t/02-mm-integration.t  view on Meta::CPAN

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') ||
        die("unable to set Git-SHA fixture timestamp, $!");
    is(system($^X, "-I$local_lib_dn", '-MASPEER::MakeMaker', 'Makefile.PL'), 0,
        'Makefile.PL can be regenerated');
    is((stat('lib/Sample.pm.sha'))[9], 1000000000,
        'unchanged Git-SHA provenance is not rewritten');
}
else {
    ok(!-e 'lib/Sample.pm.sha', 'Git-SHA generation is skipped without Git');
    pass('Git-SHA install-map test skipped without Git');
    pass('Git-SHA regeneration test skipped without Git');
    pass('Git-SHA rewrite test skipped without Git');



( run in 1.156 second using v1.01-cache-2.11-cpan-234fa220139 )