ASPEER-MakeMaker-Markdown-Pod
view release on metacpan or search on metacpan
- ASPEER::MakeMaker::MM::Import installs and implements the MakeMaker
lifecycle hooks.
- ASPEER::MakeMaker::Markdown::Pod::MM defines and runs the doc and
readme targets.
- Markdown::Pod::Embed selects Markdown, converts it to POD, and updates
the Perl source.
The integration is loaded automatically when
ASPEER::MakeMaker::Markdown::Pod is imported by Makefile.PL. It
preserves local library paths and the active MakeMaker extensions in the
generated global PERLRUN command.
make doc : Recursively converts DocBook article XML beneath doc/ to
sibling Markdown files, independently of MANIFEST. It then processes
Markdown sidecars listed in MANIFEST and merges them into matching .pm,
.pl, or executable targets. Markdown files under t/ are ignored so test
fixtures are not rewritten.
make readme : Builds README from an existing README.md. When neither
README file exists, it first creates a regular README.md from sidecar or
embedded Markdown in the VERSION_FROM file. An existing plain README
- `ASPEER::MakeMaker::Markdown::Pod` inherits the common lifecycle behavior
from `ASPEER::MakeMaker`.
- `ASPEER::MakeMaker::MM::Import` installs and implements the MakeMaker
lifecycle hooks.
- `ASPEER::MakeMaker::Markdown::Pod::MM` defines and runs the `doc` and `readme` targets.
- `Markdown::Pod::Embed` selects Markdown, converts it to POD, and updates the
Perl source.
The integration is loaded automatically when `ASPEER::MakeMaker::Markdown::Pod` is
imported by `Makefile.PL`. It preserves local library paths and the active
MakeMaker extensions in the generated global `PERLRUN` command.
`make doc`
: Recursively converts DocBook article XML beneath `doc/` to sibling Markdown
files, independently of `MANIFEST`. It then processes Markdown sidecars listed
in `MANIFEST` and merges them into matching `.pm`, `.pl`, or executable targets.
Markdown files under `t/` are ignored so test fixtures are not rewritten.
`make readme`
: Builds `README` from an existing `README.md`. When neither README file exists,
it first creates a regular `README.md` from sidecar or embedded Markdown in
lib/ASPEER/MakeMaker/Markdown/Pod.pm view on Meta::CPAN
```text
perl -MASPEER::MakeMaker::Markdown::Pod Makefile.PL
```
# DESCRIPTION
`ASPEER::MakeMaker::Markdown::Pod` integrates documentation maintenance and the project's
established distribution conventions with `ExtUtils::MakeMaker`. Importing it
from `Makefile.PL` installs the MakeMaker lifecycle hooks used to configure the
generated Makefile, package metadata and install map, Git-SHA provenance, and
documentation targets. The generated global `PERLRUN` preserves
the active local library paths and MakeMaker extensions.
The responsibilities are deliberately separated:
- `ASPEER::MakeMaker::Markdown::Pod` inherits the common MakeMaker behavior
from `ASPEER::MakeMaker`.
- `ASPEER::MakeMaker::MM::Import` installs and implements the MakeMaker
lifecycle hooks.
- `ASPEER::MakeMaker::Markdown::Pod::MM` generates and executes the `doc` and `readme`
targets.
lib/ASPEER/MakeMaker/Markdown/Pod.pm view on Meta::CPAN
perl -MASPEER::MakeMaker::Markdown::Pod Makefile.PL
=head1 DESCRIPTION
C<ASPEER::MakeMaker::Markdown::Pod> integrates documentation maintenance and the project's
established distribution conventions with C<ExtUtils::MakeMaker>. Importing it
from C<Makefile.PL> installs the MakeMaker lifecycle hooks used to configure the
generated Makefile, package metadata and install map, Git-SHA provenance, and
documentation targets. The generated global C<PERLRUN> preserves
the active local library paths and MakeMaker extensions.
The responsibilities are deliberately separated:
=over
=item -
C<ASPEER::MakeMaker::Markdown::Pod> inherits the common MakeMaker behavior
from C<ASPEER::MakeMaker>.
lib/ASPEER/MakeMaker/Markdown/Pod.pm.md view on Meta::CPAN
```text
perl -MASPEER::MakeMaker::Markdown::Pod Makefile.PL
```
# DESCRIPTION
`ASPEER::MakeMaker::Markdown::Pod` integrates documentation maintenance and the project's
established distribution conventions with `ExtUtils::MakeMaker`. Importing it
from `Makefile.PL` installs the MakeMaker lifecycle hooks used to configure the
generated Makefile, package metadata and install map, Git-SHA provenance, and
documentation targets. The generated global `PERLRUN` preserves
the active local library paths and MakeMaker extensions.
The responsibilities are deliberately separated:
- `ASPEER::MakeMaker::Markdown::Pod` inherits the common MakeMaker behavior
from `ASPEER::MakeMaker`.
- `ASPEER::MakeMaker::MM::Import` installs and implements the MakeMaker
lifecycle hooks.
- `ASPEER::MakeMaker::Markdown::Pod::MM` generates and executes the `doc` and `readme`
targets.
lib/ASPEER/MakeMaker/Markdown/Pod/Constant.pm view on Meta::CPAN
shift(), # PANDOC_EXE
'-fmarkdown_github', # from markdown (github dialect)
'-tplain', # to plaintext
shift(), # File name
]
},
# Local constants override anything above
#
%{do($local_fn) || {}},
%{do(glob(sprintf('~/.%s.local', __PACKAGE__))) || {}} # || {} avoids warning
);
# Export constants to namespace, place in export tags
#
require Exporter;
@ISA=qw(Exporter);
foreach (keys %Constant) {${$_}=$Constant{$_}}
@EXPORT=map {'$' . $_} keys %Constant;
lib/ASPEER/MakeMaker/Markdown/Pod/MM/Constant.pm view on Meta::CPAN
"$(EXE_FILES)"
"$(DIST_DEFAULT_TARGET)"
"$(SUFFIX)"
"$(ABSTRACT_FROM)"
]),
# Local constants override anything above
#
%{do($local_fn) || {}},
%{do(glob(sprintf('~/.%s.local', __PACKAGE__))) || {}} # || {} avoids warning
);
# Export constants to namespace, place in export tags
#
require Exporter;
@ISA=qw(Exporter);
{
no warnings qw(once);
t/05-mm-integration.t view on Meta::CPAN
#
local $ENV{'PERL5LIB'}=join(
$Config{'path_sep'},
grep {defined($_) && length($_)}
($extutils_lib_dn, $common_pm_fn, $embed_pm_fn, $ENV{'PERL5LIB'})
);
is(system($^X, "-I$local_lib_dn", '-MASPEER::MakeMaker::Markdown::Pod', 'Makefile.PL'), 0,
'Makefile.PL succeeds with command-line import');
my $makefile=slurp('Makefile');
like($makefile, qr/^PERLRUN\s*=.*-MASPEER::MakeMaker::Markdown::Pod/m,
'global PERLRUN reloads the MakeMaker integration');
like($makefile, qr/^PERLRUN\s*=.*-MExtUtils::MakeMaker/m,
'global PERLRUN retains loaded MakeMaker modules');
like($makefile, qr/^Makefile\s*:\s*\$\(VERSION_FROM\)$/m,
'Makefile depends on VERSION_FROM');
like($makefile, qr/^generated\.out\s*:\s*generated\.in$/m,
'existing Makefile dependencies are retained');
like($makefile, qr/(?:'-I[^']*local lib'|"-I[^"]*local lib")/,
'global PERLRUN quotes include paths containing spaces');
like($makefile, qr/^doc :: readme$/m, 'doc target generated');
like($makefile, qr/^readme ::$/m, 'readme target generated');
like($makefile,
qr/^MARKPOD_PM_TARGET=\$\(PERLRUN\) -M\$\(MARKPOD_PM\).*\s-e\s/m,
'target command explicitly reloads its dispatch module');
unlike($makefile, qr/^MM_PREFIX\s*=/m,
'private macro prefix configuration is not emitted');
like($makefile, qr/^\s*\@\$\(MARKPOD_PM_TARGET\) doc$/m,
'doc target passes its method explicitly');
like($makefile, qr/^LICENSE\s*=\s*perl$/m, 'license macro generated');
( run in 2.309 seconds using v1.01-cache-2.11-cpan-5f8a54ce150 )