Pod::Eventual::Reconstruct::LazyCut - A Subclass of Pod::Eventual::Reconstruct that emits less =cut's
version 1.000001
If you're blindly filtering POD in an Eventual manner, sometimes removing elements may change the semantics.
For instance, in
codehere =begin foo =end foo =cut codehere
That =cut is an "End of POD Marker".
=cut
However, if you simply remove the elements before the =cut, the semantics change:
codehere =cut codehere
Here, =cut marks a "Start of POD" and the second codehere is deemed "in the POD".
codehere
This module attempts to keep the document "consistent" by not emitting =cut unless a preceding =command is seen in the output.
=command
Additionally, this module will warn if elements are posted to it in ways that are likely to cause errors, for instance:
A POD Text element outside a POD region
A Non-POD element inside a POD region
The specific behavior occurred when hitting these errors can be customized via sub-classing, and overriding "write_text_outside_pod" and "write_nonpod_inside_pod"
set_inpod
clear_inpod
is_inpod
Is called when a text event is seen but we don't appear to be inside a POD region.
text
POD
$recon->write_text_outside_pod( $orig_method, $event );
Default implementation warns via Carp and then emits the element anyway, via
Carp
$self->$orig_method( $event )
Is called when a nonpod event is seen but we appear to be inside a POD region.
nonpod
$recon->write_nonpod_inside_pod( $orig_method, $event );
inpod
Kent Fredric <kentnl@cpan.org>
This software is copyright (c) 2015 by Kent Fredric <kentfredric@gmail.com>.
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 Pod::Eventual::Reconstruct, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Pod::Eventual::Reconstruct
CPAN shell
perl -MCPAN -e shell install Pod::Eventual::Reconstruct
For more information on module installation, please visit the detailed CPAN module installation guide.