Perl / perl5

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

no-foo options broken in B::Lint #4356

Closed p5pRT closed 16 years ago

p5pRT commented 23 years ago

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

Searchable as RT7594$

p5pRT commented 23 years ago

From scop@cs132170.pp.htv.fi

Turning off some lint check categories does not work in B​::Lint as documented due to a small bug. The patch below fixes it. At least 5.005_03\, 5.6.0 and 5.7.2 are affected.

Inline Patch ```diff --- Lint.pm.orig Tue Aug 28 00:56:40 2001 +++ Lint.pm Tue Aug 28 00:57:03 2001 @@ -345,7 +345,7 @@ %check = (); } else { - if ($opt =~ s/^no-//) { + if ($opt =~ s/^no_//) { $check{$opt} = 0; } else { ```
Perl Info ``` Flags: category=library severity=low Site configuration information for perl v5.6.0: Configured by prospector at Fri Mar 23 12:48:14 EST 2001. Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=linux, osvers=2.2.17-8smp, archname=i386-linux uname='linux porky.devel.redhat.com 2.2.17-8smp #1 smp fri nov 17 16:12:17 est 2000 i686 unknown ' config_args='-des -Doptimize=-O2 -march=i386 -mcpu=i686 -Dcc=gcc -Dcccdlflags=-fPIC -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dd_dosuid -Dd_semctl_semun -Di_db -Di_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Uuselargefiles' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=undef use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='gcc', optimize='-O2 -march=i386 -mcpu=i686', gccversion=2.96 20000731 (Red Hat Linux 7.1 2.96-79) cppflags='-fno-strict-aliasing' ccflags ='-fno-strict-aliasing' 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=4 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lnsl -ldl -lm -lc -lcrypt libc=/lib/libc-2.2.2.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/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl . Environment for perl v5.6.0: HOME=/home/scop LANG=en_US LANGUAGE (unset) LD_LIBRARY_PATH=/usr/lib LOGDIR (unset) PATH=/bin:/usr/bin:/usr/X11R6/bin:/usr/local/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 ville.skytta@​popsystems.com\, generated with the help of perlbug 1.28 running under perl v5.6.0.

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

Turning off some lint check categories does not work in B​::Lint as documented due to a small bug. The patch below fixes it. At least 5.005_03\, 5.6.0 and 5.7.2 are affected.

--- Lint.pm.orig Tue Aug 28 00​:56​:40 2001 +++ Lint.pm Tue Aug 28 00​:57​:03 2001 @​@​ -345\,7 +345\,7 @​@​ %check = (); } else { - if ($opt =~ s/^no-//) { + if ($opt =~ s/^no_//) { $check{$opt} = 0; } else {

Thanks\, could we get a testcase for this aswell?

(Applied in bleadperl)

-- Arthur

p5pRT commented 23 years ago

From @scop

#!./perl

BEGIN {   chdir 't' if -d 't';   if ($^O eq 'MacOS') {   @​INC = qw(​: :​:lib :​:macos​:lib);   } else {   @​INC = '.';   push @​INC\, '../lib';   } }

$| = 1; use warnings; use strict;

print "1..1\n";

my $test = 1;

sub ok { print "ok $test\n"; $test++ }

my $a; my $Is_VMS = $^O eq 'VMS'; my $Is_MacOS = $^O eq 'MacOS';

my $path = join " "\, map { qq["-I$_"] } @​INC; my $redir = $Is_MacOS ? "" : "2>&1";

$a =`$^X $path "-MO=Lint\,no-context" -e "" $redir`;

print "not " if $a =~ /^No such check​:/s; ok;

p5pRT commented 18 years ago

From guest@guest.guest.xxxxxxxx

This ticket is still open but shouldn't be.

p5pRT commented 16 years ago

p5p@spam.wizbit.be - Status changed from 'open' to 'resolved'

p5pRT commented 16 years ago

From p5p@spam.wizbit.be

A patch with tests for this bug has been send to the current maintainer of the module.