http://qs321.pair.com?node_id=1231342


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