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! <[email protected]> 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.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 01:20:16 |
| Calls: | 12,098 |
| Calls today: | 6 |
| Files: | 15,003 |
| Messages: | 6,517,863 |