Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^2: POD troubles

by John M. Dlugosz (Monsignor)
on May 14, 2011 at 10:26 UTC ( #904799=note: print w/replies, xml ) Need Help??


in reply to Re: POD troubles
in thread POD troubles

Simply searching perlpod for the word "empty" will show you more detailed information and should answer your questions.
Actually, no. The body of the doc indicates that pod paragraphs of all kinds are terminated by a blank line, but it doesn't say that you need a blank line before one in embedded POD. The end of the page does show the bit about "some older translators", but the first example that is implied to work on current translators shows =head paragraphs immediately after "plain" paragraph text (Correction: it's actually an =end, not a =head, but I meant to say "some command paragraph" and didn't recall which exactly), which contradicts the bulk of the documentation. Presumably the bulk of the document was not updated with new rules, when this example was tacked on to the end.

Other than passing reference in that appendix about apparently blank lines, it never states what a "blank line" is.

Searching through module versions and stuff on CPAN Search, it seems that pod2html is "core", so I don't know why I have "some old version". I don't know why the various POD checking doesn't report this as a problem.

It appears that I need an empty (not "blank"!) line in the host file before the embedded POD directive, and that a "command" paragraph (like =cut) cannot be run up against a "plain" paragraph. This is indicative of "some old parsers". But it's the one that matches the version of the documentation that makes that claim, isn't it?

Replies are listed 'Best First'.
Re^3: POD troubles
by LanX (Chancellor) on May 14, 2011 at 10:37 UTC
    > but the first example that is implied to work on current translators shows =head paragraphs immediately after "plain" paragraph text, which contradicts the bulk of the documentation. Presumably the bulk of the document was not updated with new rules, when this example was tacked on to the end.

    could you please post this "wrong" example, I can't find it.

    Cheers Rolf

      OK, it states:


      Many older Pod translators require the lines before every Pod command and after every Pod command (including "=cut"!) to be a blank line. Having something like this:
          # - - - - - - - - - - - -
          =item $firecracker->boom()
          This noisily detonates the firecracker object.
          =cut
          sub boom {
          ...
      
      ...will make such Pod translators completely fail to see the Pod block at all.


      So, "many older translators" don't like that, but current ones do? Otherwise why bother mentioning it?

        sigh ... thank you for wasting my time!

        Cheers Rolf

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://904799]
help
Chatterbox?
[Cosmic37]: now I have tried another blunder - can anyone explain why I am such a dunderhead?
[Cosmic37]: if ( $line =~ /$mydt/ ) { print $line; }
[Cosmic37]: I try to match successive date times stored in variable $mydt
[Cosmic37]: I guess it is searching for the string "$mydt"
[Corion]: Indeed cool, erix ;)
[Cosmic37]: rather than the value of $mydt which is a date time strong such as 2016-01-01 12:30:56
[Corion]: Cosmic37: No, but maybe $mydt doesn't contain what you think it does, or it contains characters that are special in a regular expression? Try if( $line =~ /\Q$mydt\E/) { ... for a literal match
[Cosmic37]: I mean string grrr
[Corion]: Maybe add an else branch in which you print what the values of $line and $mydt are?
[Cosmic37]: ah thank you I will try

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (8)
As of 2017-06-29 17:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (673 votes). Check out past polls.