Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is perldoc failing here?

Tags:

perl

perldoc

Downloaded ActiveState Perl V5.22.3 (tried V5.24, same result) and I can't get perldoc to run! perldoc responds with 'Invalid parameter - -R'.

Here's my command window:

Showing current PATH setting and perldoc oddness with this '-R' invalid option

I'm not having issues running scripts - just perldoc.

Thanks in advance for any suggestions.

like image 529
Lou Avatar asked Mar 27 '17 16:03

Lou


1 Answers

There's a bug in perldoc version 3.27. See this posting on the ActiveState site for a workaround.

https://community.activestate.com/node/20823

grahams ActiveState Staff Wed, 2017-02-15 11:09

This is confirmed in 5.24.1 and 5.22.3.

It's happening in the section where perldoc hands off to the local equivalent of nroff. On Win32 and Win64, a bug is allowing perldoc to get into a block of code intended to fix a problem on Debian Linux (bugs.debian.org/758689). This block won't run on Windows, so the handoff to pod2text fails.

C:\> perldoc CGI
Invalid parameter - -R

Workaround 1: Bypass perldoc and go directly to pod2text. Give pod2text the full path to the pod file.

pod2text C:\Perl\libCGI.pod

Workaround 2: Bypass the pager in perldoc.

perldoc -T CGI

Workaround 3: Use the previous release of 5.22.2 which has an older perldoc.

like image 194
grahams Avatar answered Oct 02 '22 12:10

grahams