Stenciller::Stencil - One part of a file
Version 0.1400, released 2016-02-03.
# In a plugin (this is pretty similar to what ToUnparsedText does) sub render { my $self = shift; my @out = (); STENCIL: foreach my $stencil ($self->stenciller->all_stencils) { push @out => join "\n" => $stencil->all_before_input; push @out => join "\n" => $stencil->all_input; push @out => join "\n" => $stencil->all_between; push @out => join "\n" => $stencil->all_output; push @out => join "\n" => $stencil->all_after_output; } return join "\n" => @out; }
A Stencil is one section of the file format defined in Stenciller.
Stencil
coderef
Holds all lines of the before_input section.
Holds all lines of the input section.
Holds all lines of the between section.
Holds all lines of the output section.
Holds all lines of the after_output section.
Any extra key-value pairs in the stencil header.
Can be referenced in the output for easier backtracking.
0
Should the Stencil not be included in the result?
Can be given in the stencil hash with 'name'. Depends on used plugins if it is necessary/useful.
https://github.com/Csson/p5-Stenciller
https://metacpan.org/release/Stenciller
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 Stenciller, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Stenciller
CPAN shell
perl -MCPAN -e shell install Stenciller
For more information on module installation, please visit the detailed CPAN module installation guide.