Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^2: Mysterious crash of perldoc

by Textorix (Acolyte)
on Mar 14, 2019 at 21:16 UTC ( [id://1231293]=note: print w/replies, xml ) Need Help??


in reply to Re: Mysterious crash of perldoc
in thread Mysterious crash of perldoc

Hi, thanks for the reply! I tried adding a =head TITLE element as in your first example (with blank line before and after), and I'm still getting the same behavior. Crashola. The podchecker also said this modified file is OK, as with the original file.

It seems like this problem is likely something environment or system related. It's odd, though, that the same problem is occurring on two rather different systems (CentOS 6 and OSX Mojave).
About the Mac, BTW, I didn't run strace on that machine, only on the CentOS machine. The Mac doesn't have strace on it; it does have dtrace but that requires elevated privilege to run, which I don't think I have.

Replies are listed 'Best First'.
Re^3: Mysterious crash of perldoc
by pryrt (Abbot) on Mar 14, 2019 at 22:19 UTC
    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

      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!!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1231293]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (3)
As of 2024-03-29 02:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found