Gorio3721 has asked for the wisdom of the Perl Monks concerning the following question:

The following code chokes when I try to call pod2usage when this script is run as root. It tells me to do the appropriate taint checks, etc. How do I use the pod2usage module when I am running as root and avoid the error message?
sub parse_args { GetOptions ( 'help|h|?!' => \$help, 'interactive!' => \$interactive, 'man!' => \$man ) or pod2usage(2); pod2usage(1) if $help; pod2usage(-exitstatus => 0, -verbose => 2) if $man; }

Replies are listed 'Best First'.
Re: How do I use Pod2usage as root?
by grantm (Parson) on Apr 17, 2003 at 00:10 UTC

    Try installing POD::Perldoc

    Update: to expand on that answer a little, pod2usage is a very cool module that allows you to have your script produce a nicely formatted 'usage' message directly from the POD section of the script itself. Under the covers, pod2usage 'shells out' to the perldoc command. Unfortunately the version of perldoc that ships with perl (at least 5.6.X, not sure about 5.8) was coded very cautiously and refuses to run under the root user ID. Last year Sean Burke published a new version of Perldoc as a distribution on CPAN. This newer version will run as root.