Well, the answer is in simple terms, ignore the customary practice. POD directives and snippets can be interspersed throughout your whole code. When using POD I often intersperse code and POD so that when I change a function the POD is right there to change as well. But even if you dont like that approach you can still put it after your last statement and BEFORE the __END__ or __DATA__ tags (same thing...) like so:
package Module; sub subroutine{} 1; =pod =cut __DATA__
Incidentally if you do mix your code and pod its not necessary to use '=pod' to start pod blocks. As far as I can tell all of the =PODCOMMAND that start a pod block stop the parser. But it IS vital that you put blank lines before and after _every_ pod directive, or they will be ignored. This is one of things that IMO make inline pod less than desirable in terms of code cohesion. But the advantages of easily documenting my code *usually* override that :-)..
package Module; =head1 Methods =head2 subroutine1 =cut sub subroutine1{} =head2 subroutine2 =cut sub subroutine2{} # more code =head1 copyright..... =cut 1; =pod Blah blah =cut __DATA__

Yves
--
You are not ready to use symrefs unless you already know why they are bad. -- tadmc (CLPM)


In reply to Re: POD and DATA question by demerphq
in thread POD and DATA question by ajt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.