Dist::Zilla::Plugin::InsertExample::FromMojoTemplates - Creates POD examples from a custom template format (deprecated)
Version 0.0301, released 2016-01-25.
; In dist.ini [InsertExample::FromMojoTemplates] directory = examples/source filepattern = ^\w+-\d+\.mojo$
Deprecated. See Pod::Elemental::Transformer::Stenciller instead.
Dist::Zilla::Plugin::InsertExample::FromMojoTemplates inserts examples from MojoX::CustomTemplateFileParser type files into POD. Together with Dist::Zilla::Plugin::Test::CreateFromMojo this produces examples in POD from the same source that creates the tests. The purpose is to help develop tag helpers for Mojolicious.
directory
Default: examples/source
examples/source
Where DZP::IE::FMT should look for source files.
filepattern
Default: ^\w+-\d+\.mojo$
^\w+-\d+\.mojo$
Look for files that matches a certain pattern.
make_examples
Default: 1
1
If true, will create html files in the chosen directory.
example_directory
Default: examples
examples
The directory for html files.
Source files looks like this:
==test example 1== --t-- %= link_to 'The example 3' => ['http://www.perl.org/'] --t-- --e-- <a href="http://www.perl.org/">Perl</a> --e--
This is a test block. One file can have many test blocks.
In your pod:
# EXAMPLE: filename.mojo:1, 3-30, !5, !22-26 # EXAMPLE: filename.mojo:all # EXAMPLE: filename.mojo:examples
all
Adds all examples in the source file. all can be used by itself or combined with exclusion commands.
Adds example number 3. The test number is sequential. Looping tests count as one. You can add a number as in the example to make it easier to follow.
3
3-30
Add examples numbered 5 through 30.
5
30
!5
Excludes example 5 from the previous range.
!22-26
Excludes examples numbered 22-26 from the previous range. If an example has been excluded it can't be included later. Exclusions are final.
22-26
Includes all tests marked ==test example== in the source file. Exclusion works as with all.
==test example==
The successor to this module is Pod::Elemental::Transformer::Stenciller.
https://github.com/Csson/p5-Dist-Zilla-Plugin-InsertExample-FromMojoTemplates
https://metacpan.org/release/Dist-Zilla-Plugin-InsertExample-FromMojoTemplates
Erik Carlsson <info@code301.com>
This software is copyright (c) 2016 by Erik Carlsson.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Dist::Zilla::Plugin::InsertExample::FromMojoTemplates, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Dist::Zilla::Plugin::InsertExample::FromMojoTemplates
CPAN shell
perl -MCPAN -e shell install Dist::Zilla::Plugin::InsertExample::FromMojoTemplates
For more information on module installation, please visit the detailed CPAN module installation guide.