in reply to Where to place POD

Because the module is never really 'finished' and gets added to whenever I need a new method, it seems sensible to add the POD next to each method

Despite you being the module implementor and its only user, I still feel it's good discipline to maintain a clean separation between interface and implementation (for example, by placing the module's external user-interface POD after the __END__ token in the .pm file, while inserting technical implementation comments right next to the code they are clarifying).

Hopefully doing that will help improve code quality, while making it a snap to release your handy utility module to a wider audience in the future.

See also: Commenting and Documentation References

Updated: minor changes to wording.

👁️🍾👍🦟

Replies are listed 'Best First'.
Re^2: Where to place POD
by Bod (Parson) on Jan 15, 2024 at 21:18 UTC
    Despite you being the module implementor and its only user, I still feel it's good discipline to maintain a clean separation between interface and implementation

    Whilst I am the module implementor and only user, one or two other people will probably be involved in using and developing this module in the future. However, it will never be a public module as its functionality is useless outside the ecosystem for which it was created.

    Normally, I do add POD at the end of a module, as you suggest.

    The question comes about here because the module is updated very frequently and evolves to meet changing needs in the rest of the codebase. This seems, on the surface at least, to warrant having the POD for each method next to that method.

    Having read the various comments, I shall try interleaving POD with code. It is not exactly going to be hard to group it all together and relocate it to the end of the file if I find issues with this approach...