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

Re^4: POD Meditation?

by LanX (Bishop)
on Apr 28, 2012 at 12:47 UTC ( #967808=note: print w/replies, xml ) Need Help??

in reply to Re^3: POD Meditation?
in thread POD Meditation?

> Except that there isn't any POD...

Where do you get your definition for POD from?

Perl and POD are two different languages which can be intermingled somehow.

  • POD is what the POD-parser matches, and the input doesn't have to be a perl-source anyway.
  • And the Perl-parser doesn't know much about POD-syntax, it basically ignores any blocks between lines starting with a new statement beginning with "=" and followed by at least one word and finished by '=cut'.

    This ignored block doesn't need to be valid POD:

    > perl print "x"; =bala bala blaa asas =cut print "x"
    And the code surrounding POD doesn't need to be Perl.

    Cheers Rolf

  • Replies are listed 'Best First'.
    Re^5: POD Meditation?
    by JavaFan (Canon) on Apr 28, 2012 at 17:07 UTC
      Where do you get your definition for POD from?
      From man perlsyn:
      PODs: Embedded Documentation
          Perl has a mechanism for intermixing documentation with source code.
          While it's expecting the beginning of a new statement, if the compiler
          encounters a line that begins with an equal sign and a word, like this
              =head1 Here There Be Pods!
          Then that text and all remaining text up through and including a line
          beginning with "=cut" will be ignored.  The format of the intervening
          text is described in perlpod.
      Perl and POD are two different languages which can be intermingled somehow.
      But in the snippet the OP gives, there's nothing intermingled. There's just Perl code.
      And the Perl-parser doesn't know much about POD-syntax
      I'm not claiming it does, or should be doing. But Perl does have to know where a POD section starts, and where it ends. And it knows where a POD section starts a lot better than any POD parser.
        /* =head1 Not_Perl() Only POD can parse POD! =cut */ function Not_Perl (){ window.alert("JavaScript!"); }

        Cheers Rolf

          So, you have Javascript comment.

          Is there a point you are trying to make?

    Log In?

    What's my password?
    Create A New User
    Node Status?
    node history
    Node Type: note [id://967808]
    [M4ver1k]: I feel like being able to toggle a running script on the fly by updating variables from a config file using Config::Simple. But in the while loop, it seems like it doesn't update the variable after the first past. Is this generally just a bad idea?

    How do I use this? | Other CB clients
    Other Users?
    Others chilling in the Monastery: (8)
    As of 2017-11-20 03:04 GMT
    Find Nodes?
      Voting Booth?
      In order to be able to say "I know Perl", you must have:

      Results (283 votes). Check out past polls.