Jherico
Jherico

Reputation: 29240

How do I call pod2usage using my caller's documentation?

I'd like to be able to call pod2usage in a method that encapsulates a lot of standardized command line argument handling, but I can't see how I'd be able to put that handling into a separate module and have the pod2usage output be the documentation from the calling file. Is this possible?

Upvotes: 1

Views: 182

Answers (1)

Colin Fine
Colin Fine

Reputation: 3364

ONe of the many options to pod2usage is

"-input" A reference to a filehandle, or the pathname of a file from which the invoking script's pod documentation should be read. It defaults to the file indicated by $0 ($PROGRAM_NAME for users of English.pm).

Upvotes: 4

Related Questions