I tried adding a =head TITLE element as in your first example (with blank line before and after)
Did you use =head1 TITLE, like I showed, or =head TITLE like you showed?
and I'm still getting the same behavior. Crashola
The exact same error message, or a different error message? If different, please quote it here.
Using this exact text, perldoc blah.pl processes just fine for me on Windows Strawberry Perl 5.26.2 and on an ancient CentOS 4.6 with Perl 5.8.5:
#!/usr/bin/perl -w
use strict;
=pod
=head1 TITLE
My Documentation
=cut
| [reply] [Watch: Dir/Any] [d/l] [select] |
It was =head1 TITLE that I added, as you wrote, not =head TITLE as in the typo from my earlier reply (sorry for the typo).
A moment ago, as an experiment I tried changing the =head1 to =head ... and with that change, the podchecker definitely flagged an error, which didn't happen when I tried your suggestion before.
So that wasn't the issue. BUT as it happens, I did just now make a breakthrough, with something not related to POD content...
There appear two have been two issues contributing to my situation. One was the lack of a heading starter, as you pointed out. That appears to be the cause of the status=1 error exit. The other is that, on both of my systems, I was seeing no output because of the PERLDOC_PAGER=“less -+C -E” value that I was using. Because my POD text is so short... less than one page... the “-E” option was causing less to exit immediately (normal exit) after displaying the text. So there still appeared to be no output -- although looking more closely, the screen sometimes flickers slightly while the output appears and then disappears. In this case the exit status was normal 0 instead of 1.
So if I change PERLDOC_PAGER to just “less” then all works OK (!), as long as the =head1 element is in the POD.
On the question about error messages, part of my trouble was that there never were any error messages displayed in a usual way. But the perlpod exit status was different (1 before your fix, 0 after your fix despite still no visible output from the POD).
That said, I’m a bit surprised that this heading element is required. In the perlpod web page, when I read “You can simply type in your text without any markup whatsoever, and with just a blank line before and after,” apparently I took that too literally, or perhaps out of context. Looking at the page again, it still doesn’t look obvious to me that a heading paragraph is required to be present, from the description in that page. It’s also a bit odd that the podchecker indicated all was OK in my original file, despite lack of that element whose absence caused an error in perldoc.
As for the strace output: interesting as that was, it appears that the rt_sigaction call with EINVAL return was a red herring.
Thanks for the help!!
| [reply] [Watch: Dir/Any] |