Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: workaround to fix perldoc

by VinsWorldcom (Prior)
on Mar 16, 2019 at 19:49 UTC ( #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 (Archbishop) 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
Node Status?
node history
Node Type: note [id://1231342]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (7)
As of 2020-05-30 18:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (173 votes). Check out past polls.

    Notices?