bigpresh / bigpresh/Pod-Readme
Inconsistent handling of :for readme include
- Dominant language
- Perl
- Stars
- 7
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
**=for readme include type=text** had mildly odd behavior in v0.11. It has stranger behavior in v1.1.2.
Neither is entirely "correct", but v1.1.2 represents a regression.
The documentation says that type can be text or pod. So one would think that pod will be interpreted as pod, and text passed through literally.
With v0.11, the following test case did that - except for a bit of extra indentation.
v1.1.2 indents evenly, but doubles the number of newlines
I expect the file to be output as literal text, e.g. as though it was a verbatim paragraph. That is, processes as if one space were added to the beginning of each line, then lexed as POD.
Here is the test case, abstracted from a real module. First, the included file
```
# cat include.txt
Revision history for perl module
1.0 2014-08-20
- Initial Version
1.1 2015-10-09
- Allow same OID elements in RDNs
- Support for all DirectoryStrings
- New accessor method: organizationName
1.2 2015-11-13
- Add generic method extensionValue
- Ommit unknown or damaged extensions
__END__
#
```
The POD:
```
# cat doc.pod
=pod
=head1 CHANGES
=for readme include file=include.txt type=text start=^1\.0 stop=^__END__
See repo for more detail.
=cut
#
```
The results with 0.11 (Note: second and subsequent lines of lists indented, but lines are together):
```
# pod2readme doc.pod - readme
CHANGES
1.0 2014-08-20
- Initial Version
1.1 2015-10-09
- Allow same OID elements in RDNs
- Support for all DirectoryStrings
- New accessor method: organizationName
1.2 2015-11-13
- Add generic method extensionValue
- Ommit unknown or damaged extensions
See repo for more detail.
#
```
And the results with 1.1.2 (Note: each newline is being treated as a paragraph.)
```
# perlbrew exec --quiet --with 5.22.1 pod2readme -c -t readme -f text doc.pod
CHANGES
1.0 2014-08-20
- Initial Version
1.1 2015-10-09
- Allow same OID elements in RDNs
- Support for all DirectoryStrings
- New accessor method: organizationName
1.2 2015-11-13
- Add generic method extensionValue
- Ommit unknown or damaged extensions
See repo for more detail.
```
The same format is generated with **markdown** output. See https://github.com/tlhackque/Crypt-PKCS10 for a (full) example.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.