Perl / perl5

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

use strict enhancement #5504

Closed p5pRT closed 9 years ago

p5pRT commented 22 years ago

Migrated from rt.perl.org#9426 (status was 'rejected')

Searchable as RT9426$

p5pRT commented 22 years ago

From warrend@mdhost.cse.tek.com

Created by warrend@tek.com

The use strict in subroutines is real nice at telling me variables that have not been specified properly.

It doesn't seem to say anything about extra specifications of variables that are not used in the routine. This makes it harder to make sure everything is "clean". Generally this happens after you write the routine and then make changes later. You forget to go remove the "my $vars".

It would be nice if the compiler would let us know about them.

Perl Info ``` Flags: category=core severity=wishlist Site configuration information for perl v5.6.1: Configured by warrend at Tue Jun 12 16:54:04 PDT 2001. Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration: Platform: osname=solaris, osvers=2.8, archname=sun4-solaris uname='sunos rosewood 5.8 generic_108528-03 sun4u sparc ' config_args='' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef Compiler: cc='gcc', ccflags ='-fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', optimize='-O', cppflags='-fno-strict-aliasing' ccversion='', gccversion='2.95.3 20010315 (release)', gccosandvers='solaris2.8' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, usemymalloc=y, prototype=define Linker and Libraries: ld='gcc', ldflags =' ' libpth=/usr/lib /usr/ccs/lib libs=-lsocket -lnsl -ldb -ldl -lm -lc perllibs=-lsocket -lnsl -ldl -lm -lc libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/5.6.1/sun4-solaris/CORE' cccdlflags='-fPIC', lddlflags='-G' Locally applied patches: @INC for perl v5.6.1: /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/5.6.1/sun4-solaris /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/5.6.1 /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/site_perl/5.6.1/sun4-solaris /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/site_perl/5.6.1 /proj/wdt/gnu_sun5.8/perl-5.6.1/lib/site_perl . Environment for perl v5.6.1: HOME=/login/warrend LANG=C LANGUAGE (unset) LD_LIBRARY_PATH=/tools/eda/ldv/bin:/proj/eda/disk4/ldv33qsr2/tools/inca/lib:/proj/eda/disk4/ldv33qsr2/tools/lib:/proj/eda/disk1/LMC_r41/lib/sun4Solaris.lib LOGDIR (unset) PATH=.:/proj/wdt/bin:/proj/wdt/sun5.8/bin:/proj/wdt/X.V11R6/sun5.8/bin:/login/warrend:/login/warrend/bin:/login/warrend/bin/sun5.8:/usr/ucb:/usr/openwin/bin:/usr/ccs/bin:/usr/bin:/etc:/usr/sbin:/tools/eda/psd142c/tools/pcb/bin:/tools/eda/psd142c/tools/bin:/tools/eda/psd142c/tools/dfII/bin:/tools/eda/psd142c/tools/fet/bin:/tools/eda/psd142c/tools/specctra/bin:/tools/eda/fetools142/bin:/tools/eda/cadtools142/bin:/tools/eda/ldv/LSF:/tools/eda/ldv/bin:/proj/eda/disk4/ldv33qsr2/tools/bin:/proj/eda/disk4/ldv33qsr2/tools/inca/bin:/proj/eda/disk4/ldv33qsr2/tools/dfII/bin:/proj/eda/97Aannex/vera-4.5-solaris2.5/bin:/proj/eda/annex2/debussy_5.2.5/bin:/stdapps/cms/bin PERL_BADLANG (unset) SHELL=/bin/tcsh ```
p5pRT commented 11 years ago

From @jkeenan

On Fri May 31 06​:17​:03 2002\, warrend@​mdhost.cse.tek.com wrote​:

This is a bug report for perl from warrend@​tek.com\, generated with the help of perlbug 1.33 running under perl v5.6.1.

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

The use strict in subroutines is real nice at telling me variables that have not been specified properly.

It doesn't seem to say anything about extra specifications of variables that are not used in the routine. This makes it harder to make sure everything is "clean". Generally this happens after you write the routine and then make changes later. You forget to go remove the "my $vars".

It would be nice if the compiler would let us know about them.

This motion for an enhancement to 'strict' has failed to receive a second in more than twelve years. I recommend that the ticket be closed.

Thank you very much. Jim Keenan

p5pRT commented 11 years ago

From tchrist@perl.com

On Fri May 31 06​:17​:03 2002\, warrend@​mdhost.cse.tek.com wrote​:

This is a bug report for perl from warrend@​tek.com\, generated with the help of perlbug 1.33 running under perl v5.6.1.

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

The use strict in subroutines is real nice at telling me variables that have not been specified properly.

It doesn't seem to say anything about extra specifications of variables that are not used in the routine. This makes it harder to make sure everything is "clean". Generally this happens after you write the routine and then make changes later. You forget to go remove the "my $vars".

It would be nice if the compiler would let us know about them.

This motion for an enhancement to 'strict' has failed to receive a second in more than twelve years. I recommend that the ticket be closed.

Is this is asking for Perl to detect variables declared but not used?

That might be difficult for certain cases and possible in others.

But I can hardly see making it a fatal compilation error in the default case. Perhaps it could be a warning at best.

--tom

p5pRT commented 11 years ago

From @rjbs

* Tom Christiansen \tchrist@​perl\.com [2013-02-24T19​:58​:56]

This motion for an enhancement to 'strict' has failed to receive a second in more than twelve years. I recommend that the ticket be closed.

Is this is asking for Perl to detect variables declared but not used?

That might be difficult for certain cases and possible in others.

But I can hardly see making it a fatal compilation error in the default case. Perhaps it could be a warning at best.

I believe this is a duplicate of https://rt-archive.perl.org/perl5/Ticket/Display.html?id=5087

-- rjbs

p5pRT commented 9 years ago

From @jkeenan

On Sun Feb 24 15​:44​:28 2013\, jkeenan wrote​:

On Fri May 31 06​:17​:03 2002\, warrend@​mdhost.cse.tek.com wrote​:

This is a bug report for perl from warrend@​tek.com\, generated with the help of perlbug 1.33 running under perl v5.6.1.

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

The use strict in subroutines is real nice at telling me variables that have not been specified properly.

It doesn't seem to say anything about extra specifications of variables that are not used in the routine. This makes it harder to make sure everything is "clean". Generally this happens after you write the routine and then make changes later. You forget to go remove the "my $vars".

It would be nice if the compiler would let us know about them.

This motion for an enhancement to 'strict' has failed to receive a second in more than twelve years. I recommend that the ticket be closed.

A year-and-a-half later\, this feature request still has not received a second. Marking ticket rejected.

Thank you very much. Jim Keenan

p5pRT commented 9 years ago

@jkeenan - Status changed from 'open' to 'rejected'