Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: workaround to fix perldoc

by VinsWorldcom (Prior)
on Mar 16, 2019 at 19:49 UTC ( [id://1231342]=note: print w/replies, xml ) Need Help??


in reply to workaround to fix perldoc

I have Git for Windows and "less" from GNUWin32 installed so use "less" as my pager. The GNUWin32 version handles Windows better than the Git for Windows "less" version. In any case, PerlDoc doesn't work well with it, so my fix:

# Perldoc paging using less: create: c:\strawberry\perl\bin\perldoc (without extension) Then, in Pod::Perldoc search for "-R" and comment out or put an if {} around, e.g., if ( $^O ne 'MSWin32' ) { BLOCK }

My problem stemmed from a command line option to "less" that my "less.exe" didn't support, so it was just printing the whole POD at once with an error as well. Now, 'perldoc ARG' produces the PerlDoc for "ARG" (whatever it may be) using the "less" pager.

Hope that helps.

Replies are listed 'Best First'.
Re^2: workaround to fix perldoc (SOLVED)
by LanX (Saint) on Mar 16, 2019 at 20:58 UTC
    You nailed it, thanks! =)

    This -R option is responsible for the problems on windows since the pager "more" can't handle "-R".

    commenting out this line (#1941 for me)

    #local $ENV{MORE} = defined $ENV{MORE} ? "$ENV{MORE} -R" : "-R";

    fixed the win-bug for me.

    Apparently this was added to fix unicode problems on linux, ignoring that Win has it's own "more" pager.

    For those who wonder how to find Pod::Perldoc in their local installation

    >perldoc -l Pod::Perldoc C:\Perl_524\lib\Pod\Perldoc.pm

    does the trick, even with corrupt pager options.

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1231342]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (2)
As of 2024-04-25 03:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found