• pod incluced from modules

    From hymie!@21:1/5 to All on Wed Mar 1 14:50:22 2023
    I have three perl programs, and they all use the "require" command
    to call a local module for shared functions, command-line options,
    and stuff like that. (All of it was written by me.)

    I would like to use POD to document my three programs. However, since
    they share the module, I would like to document the common stuff in the
    module itself, rather than have to re-type (and remember to update) module changes in the individual programs.

    But as far as I can tell, the perldoc command does not read the
    included module, it only reads the POD that is inside the specific
    program file.

    Is there a way that I can do this -- have perldoc "follow" my included
    module and look for more POD to be displayed?

    --hymie! http://nasalinux.net/~hymie hymie@nasalinux.net

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Rainer Weikusat@21:1/5 to hymie@nasalinux.net on Wed Mar 1 15:58:28 2023
    hymie! <hymie@nasalinux.net> writes:
    I have three perl programs, and they all use the "require" command
    to call a local module for shared functions, command-line options,
    and stuff like that. (All of it was written by me.)

    I would like to use POD to document my three programs. However, since
    they share the module, I would like to document the common stuff in the module itself, rather than have to re-type (and remember to update) module changes in the individual programs.

    But as far as I can tell, the perldoc command does not read the
    included module, it only reads the POD that is inside the specific
    program file.

    Is there a way that I can do this -- have perldoc "follow" my included
    module and look for more POD to be displayed?

    Judging from a cursory look at the code, no: The Pod::Perldoc module
    only ever processes one file. The best you can do is probably to include something like

    See perldoc <module> for more information.

    in the text.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From E. Choroba@21:1/5 to Rainer Weikusat on Thu Mar 2 01:50:14 2023
    On Wednesday, March 1, 2023 at 4:58:34 PM UTC+1, Rainer Weikusat wrote:
    hymie! <hy...@nasalinux.net> writes:
    I have three perl programs, and they all use the "require" command
    to call a local module for shared functions, command-line options,
    and stuff like that. (All of it was written by me.)

    I would like to use POD to document my three programs. However, since
    they share the module, I would like to document the common stuff in the module itself, rather than have to re-type (and remember to update) module changes in the individual programs.

    But as far as I can tell, the perldoc command does not read the
    included module, it only reads the POD that is inside the specific
    program file.

    Is there a way that I can do this -- have perldoc "follow" my included module and look for more POD to be displayed?
    Judging from a cursory look at the code, no: The Pod::Perldoc module
    only ever processes one file. The best you can do is probably to include something like

    See perldoc <module> for more information.

    in the text.

    You can introduce a "build" process to the programs that copies the relevant parts of the documentation from the modules.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)