Skip Menu |

This queue is for tickets about the App-perlbrew CPAN distribution.

Report information
The Basics
Id: 79548
Status: open
Priority: 0/
Queue: App-perlbrew

People
Owner: Nobody in particular
Requestors: NHORNE [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Unimportant
Broken in: 0.50
Fixed in: (no value)



Subject: switch-off give manpath usage message
$ perlbrew switch-off Use of uninitialized value in split at /loader/0x20072298/local/lib.pm line 8. manpath: unknown option -- q manpath, version 1.6g usage: manpath [-adfhktwW] [section] [-M path] [-P pager] [-S list] [-m system] [-p string] name ... a : find all matching entries c : do not use cat file d : print gobs of debugging information D : as for -d, but also display the pages f : same as whatis(1) h : print this help message k : same as apropos(1) K : search for a string in all pages t : use troff to format pages for printing w : print location of man page(s) that would be displayed (if no name given: print directories that would be searched) W : as for -w, but display filenames only C file : use `file' as configuration file M path : set search path for manual pages to `path' P pager : use program `pager' to display pages S list : colon separated section list m system : search for alternate system's man pages p string : string tells which preprocessors to run e - [n]eqn(1) p - pic(1) t - tbl(1) g - grap(1) r - refer(1) v - vgrind(1) perlbrew is switched off. Owner@packard ~ $ uname -a CYGWIN_NT-6.0 packard 1.7.16(0.262/5/3) 2012-07-20 22:55 i686 Cygwin
The problem appears to occur whenever perlbrew's bashrc executes. It seems that BSD-style manpath(1) has a -q switch while Linux-style (and cygwin) does not. The result in the latter case is a usage message and an empty MANPATH_WITHOUT_PERLBREW. On a quick test on OS X, I don't see a difference in output between C<manpath> and C<manpath -q>, so here's a suggested patch. If the -q is needed on other BSD flavors, bashrc may need to do some probing. --- bashrc~ 2012-09-17 19:01:15.259159468 -0400 +++ bashrc 2012-09-19 08:44:49.278173962 -0400 @@ -16,7 +16,7 @@ } __perlbrew_set_path () { - export MANPATH_WITHOUT_PERLBREW=`perl -e 'print join ":", grep { index($_, $ENV{PERLBREW_ROOT}) } split/:/,qx(manpath -q);'` + export MANPATH_WITHOUT_PERLBREW=`perl -e 'print join ":", grep { index($_, $ENV{PERLBREW_ROOT}) } split/:/,qx(manpath);'` if [ -n "$PERLBREW_MANPATH" ]; then export MANPATH="$PERLBREW_MANPATH:$MANPATH_WITHOUT_PERLBREW" else
Looks like this has been patched at https://github.com/gugod/App- perlbrew/commit/1fcb7014e41caf0205fa0097fcc2385b5e97aa65
call in done.
Reopening, please revert this change. I'm on Linux. Everytime perlbrew runs implicitly through .bashrc, manpath prints a warning: $ perlbrew --version /home/daxim/local/share/perlbrew/bin/perlbrew - App::perlbrew/0.72 $ bash manpath: warning: $MANPATH set, ignoring /etc/manpath.config $ manpath manpath: warning: $MANPATH set, ignoring /etc/manpath.config /home/daxim/local/share/perlbrew/perls/perl-5.20.0/man:/usr/local/man:/usr/share/man $ manpath --version manpath 2.6.6 -q silences this warning. $ manpath -q /home/daxim/local/share/perlbrew/perls/perl-5.20.0/man:/usr/local/man:/usr/share/man Work-around until this bug is fixed: alias manpath='/usr/bin/manpath -q' bailey@mail.newman.upenn.edu wrote: Show quoted text
> It seems that BSD-style manpath(1) has a -q switch while Linux-style (and > cygwin) does not.
manpath had a -q switch since at least 2001. <http://git.savannah.gnu.org/cgit/man-db.git/commit/src/manpath.c?id=190b315e1caed82966c31306213aa58ab62abdf8>