Perl / perl5

🐪 The Perl programming language
https://dev.perl.org/perl5/
Other
1.85k stars 527 forks source link

perldoc fails when Makefile.PL is in cwd #2006

Closed p5pRT closed 21 years ago

p5pRT commented 23 years ago

Migrated from rt.perl.org#3281 (status was 'resolved')

Searchable as RT3281$

p5pRT commented 23 years ago

From larryd@sat02.zedcor.com

Created by larryd@arttoday.com

perldoc always checks for Makefile.PL in the current directory\, attempts "use blib" if it finds one\, and dies if it doesn't find one. If one happens to be in a directory containing this file\, such as a freshly unpacked tarball\, perldoc is non-functional.

To reproduce problem (must not be root)​:

  $ cd   $ mkdir bug   $ cd bug   $ touch Makefile.PL   $ perldoc -f print   Cannot find blib even in /home/larryd/bug/../../../../..   BEGIN failed--compilation aborted at (eval 2) line 1.   ...propagated at /usr/local/bin/perldoc line 165.

Perl Info ``` Flags: category=utilities severity=medium Site configuration information for perl v5.6.0: Configured by larryd at Thu May 25 08:55:35 MST 2000. Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=linux, osvers=2.2.14-5.0, archname=i686-linux uname='linux sat02.zedcor.com 2.2.14-5.0 #1 tue mar 7 21:07:39 est 2000 i686 unknown ' config_args='-des' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) cppflags='-fno-strict-aliasing' ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Locally applied patches: @INC for perl v5.6.0: /usr/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i686-linux /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl . Environment for perl v5.6.0: HOME=/home/larryd LANG=en_US LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/larryd/bin PERL_BADLANG (unset) SHELL=/bin/bash ```
p5pRT commented 23 years ago

From [Unknown Contact. See original ticket]

Created by larryd@arttoday.com

perldoc always checks for Makefile.PL in the current directory\, attempts "use blib" if it finds one\, and dies if it doesn't find one. If one happens to be in a directory containing this file\, such as a freshly unpacked tarball\, perldoc is non-functional.

To reproduce problem (must not be root)​:

  $ cd   $ mkdir bug   $ cd bug   $ touch Makefile.PL   $ perldoc -f print   Cannot find blib even in /home/larryd/bug/../../../../..   BEGIN failed--compilation aborted at (eval 2) line 1.   ...propagated at /usr/local/bin/perldoc line 165.

Perl Info ``` Flags: category=utilities severity=medium Site configuration information for perl v5.6.0: Configured by larryd at Thu May 25 08:55:35 MST 2000. Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=linux, osvers=2.2.14-5.0, archname=i686-linux uname='linux sat02.zedcor.com 2.2.14-5.0 #1 tue mar 7 21:07:39 est 2000 i686 unknown ' config_args='-des' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='cc', optimize='-O2', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) cppflags='-fno-strict-aliasing' ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' stdchar='char', d_stdstdio=define, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -lndbm -lgdbm -ldb -ldl -lm -lc -lposix -lcrypt libc=/lib/libc-2.1.3.so, so=so, useshrplib=false, libperl=libperl.a Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-rdynamic' cccdlflags='-fpic', lddlflags='-shared -L/usr/local/lib' Locally applied patches: @INC for perl v5.6.0: /usr/local/lib/perl5/5.6.0/i686-linux /usr/local/lib/perl5/5.6.0 /usr/local/lib/perl5/site_perl/5.6.0/i686-linux /usr/local/lib/perl5/site_perl/5.6.0 /usr/local/lib/perl5/site_perl . Environment for perl v5.6.0: HOME=/home/larryd LANG=en_US LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/larryd/bin PERL_BADLANG (unset) SHELL=/bin/bash ```
p5pRT commented 23 years ago

From [Unknown Contact. See original ticket]

This is a bug report for perl from larryd@​arttoday.com\, generated with the help of perlbug 1.28 running under perl v5.6.0.

----------------------------------------------------------------- [Please enter your report here]

perldoc always checks for Makefile.PL in the current directory\, attempts "use blib" if it finds one\, and dies if it doesn't find one. If one happens to be in a directory containing this file\, such as a freshly unpacked tarball\, perldoc is non-functional.

Certainly that insanity will be cured in the impending brain-transplant.

--tom

p5pRT commented 23 years ago

From @gisle

Richard Foley \Richard\.Foley@​m\.dasa\.de writes​:

----------------------------------------------------------------- [Please enter your report here]

perldoc always checks for Makefile.PL in the current directory\, attempts "use blib" if it finds one\, and dies if it doesn't find one. If one happens to be in a directory containing this file\, such as a freshly unpacked tarball\, perldoc is non-functional.

To reproduce problem (must not be root)​:

$ cd $ mkdir bug $ cd bug $ touch Makefile.PL $ perldoc -f print Cannot find blib even in /home/larryd/bug/../../../../.. BEGIN failed--compilation aborted at (eval 2) line 1. ...propagated at /usr/local/bin/perldoc line 165.

I had the same problem and cured my perldoc with this patch​:

Inline Patch ```diff --- 5.6.0/bin/perldoc Thu Mar 23 20:56:18 2000 +++ 5.6.0_priv/bin/perldoc Tue May 30 15:32:24 2000 @@ -161,7 +161,7 @@ eval q{ use lib qw(. lib); 1; } or die; # don't add if superuser - if ($< && $>) { # don't be looking too hard now! + if ($< && $> && -f "blib") { # don't be looking too hard now! eval q{ use blib; 1 } or die; } } Regards, Gisle ```
p5pRT commented 21 years ago

From @rspier

Recent perl's use Pod​::Perldoc which doesn't have this problem.

p5pRT commented 21 years ago

@rspier - Status changed from 'open' to 'resolved'