Perl / perl5

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

Unexpected complaint of NE deprecation #2226

Closed p5pRT closed 20 years ago

p5pRT commented 24 years ago

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

Searchable as RT3537$

p5pRT commented 24 years ago

From rherbert@sycamorehq.com

Created by ryan@sycamorehq.com

Perl unexpectedly complains about the use of NE in a script that resembles this one​:

  #!/usr/bin/perl -w

  use Data​::Dumper;

  %test = (   MT => 'Montana'\,   NE => 'Nebraska'\,   NV => 'Nevada'\,   );

  print Dumper(\%test);

When this script is run or is checked with -c\, the following error message is generated​:

  Use of NE is deprecated at test.pl line 7.

However\, the data in the hash are correct. This problem does not occur if 'NE' is quoted.

Perl Info ``` Site configuration information for perl 5.00503: Configured by root at Wed Feb 2 15:34:50 EST 2000. Summary of my perl5 (5.0 patchlevel 5 subversion 3) configuration: Platform: osname=linux, osvers=2.2.5-22smp, archname=i386-linux uname='linux porky.devel.redhat.com 2.2.5-22smp #1 smp wed jun 2 09:11:51 edt 1999 i686 unknown ' hint=recommended, useposix=true, d_sigaction=define usethreads=undef useperlio=undef d_sfio=undef Compiler: cc='cc', optimize='-O2 -m486 -fno-strength-reduce', gccversion=egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) cppflags='-Dbool=char -DHAS_BOOL -I/usr/local/include' ccflags ='-Dbool=char -DHAS_BOOL -I/usr/local/include' stdchar='char', d_stdstdio=undef, usevfork=false intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 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 -ldl -lm -lc -lposix -lcrypt libc=, 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 5.00503: /usr/lib/perl5/5.00503/i386-linux /usr/lib/perl5/5.00503 /usr/lib/perl5/site_perl/5.005/i386-linux /usr/lib/perl5/site_perl/5.005 . Environment for perl 5.00503: HOME=/home/rherbert LANG=en_US LANGUAGE (unset) LD_LIBRARY_PATH (unset) LOGDIR (unset) PATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/rherbert/bin PERL_BADLANG (unset) SHELL=/bin/bash ```
p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

On Jul 17\, Ryan Herbert said​:

Perl unexpectedly complains about the use of NE in a script that resembles this one​:

   \#\!/usr/bin/perl \-w
   %test = \(
       MT => 'Montana'\,
       NE => 'Nebraska'\,
       NV => 'Nevada'\,
   \);

   Use of NE is deprecated at test\.pl line 7\.

You'll get the same message for EQ\, LE\, GE\, LT\, and GT\, which are the string comparison operators in capital letters (except for 'cmp' which is oddly not among them).

  $foo NE $bar

is "legal" Perl code\, except that -w complains that 'NE' is deprecated.

You got away with murder because the 'NE' is followed by a =>\, which quotes the preceeding string.

  perl -we 'open NE\, "foo"' Use of NE is deprecated at -e line 1. Not enough arguments for open at -e line 1\, near "open NE" syntax error at -e line 1\, near "NE\," Execution of -e aborted due to compilation errors.

  perl -we 'open NE => "foo"' Precedence problem​: open NE should be open(NE) at -e line 1. Use of NE is deprecated at -e line 1. Name "main​::NE" used only once​: possible typo at -e line 1.

Whatever the issue\, Perl allows the two-character string comparison operators to be used in lowercase and uppercase\, although uppercase ones get you whacked.

p5pRT commented 24 years ago

From @mjdominus

Perl unexpectedly complains about the use of NE in a script that resembles this one​: %test = ( NE => 'Nebraska'\,

'NE' is a long-dead synonym for 'ne'. The warning is probably generated by the lexer as soon as the NE token is seen. It is certainly a bug that the warning is generated for a token on the left-hand side of the => operator; this might be fixable.

But I think it might be better to just eliminate support for NE entirely. Jarkko\, do you think this is the right approach? NE has been deprecated since Perl 5.000.

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

2000-07-17-12​:59​:32 Mark-Jason Dominus​:

But I think it might be better to just eliminate support for NE entirely. [...] NE has been deprecated since Perl 5.000.

Looks safe to me; I don't think any current module uses NE in a way that would break if it were removed. Here's the result of

  find . -type f -printf '%P\n' | \   egrep -i '\.p[hlm]$' | \   xargs grep -w NE

on my modules-unpacked directory\, the generated using the script I posted in

  Date​: Thu\, 13 Jul 2000 13​:33​:53 -0400   From​: Bennett Todd \bet@​rahul\.net   To​: Alan Burlison \Alan\.Burlison@​uk\.sun\.com   Cc​: perl5-porters@​perl.org   Subject​: CPAN module unpack/index (was Re​: Mirroring all of CPAN ...)   Message-Id​: \20000713133353\.B4230@​oven\.com

-Bennett

Apache-iNcom-0.09/lib/HTML/FormValidator.pm​:MA MI MN MS MO MT NE NV NH NJ NM NY NC ND OH OK OR PA PR RI Aviation-Report-1.02/Report.pm​:NE​:northeast Data-Dump-0.03/Dump.pm​:DESTROY END EQ GE GT INIT LE LT NE abs accept alarm and atan2 bind GD-1.30/GD.pm​: $diagonal_brush->line(0\,4\,4\,0\,$black); # NE diagonal Geography-USStates-0.12/USStates.pm​: 'NE' => 'Nebraska'\, NJ => 'New Jersey'\, NH => 'New Hampshire'\, Gtk-Perl-0.7000/Gtk/samples/testpacker.pl​: my($button_ne) = new Gtk​::ToggleButton "NE"; HTML-Format-1.23/lib/HTML/FormatPS.pm​:/NE { %def HTML-Format-1.23/lib/HTML/FormatPS.pm​: push(@​prolog\, "ISOLatin1Encoding/$full-ISO/$full NE\n"); InfoBrief-0.14/InfoBrief.pm​:/NE { %def InfoBrief-0.14/InfoBrief.pm​:ISOLatin1Encoding /AvantGarde-Demi-ISO /AvantGarde-Demi NE Locale-SubCountry-1.02/SubCountry.pm​:NE​:Nebraska Logfile-0.202/lib/Net/Country.pm​:NE Niger Mac-Glue-0.58/blib/lib/Mac/AETE/Format/Glue.pm​: $self->{'NE'} = $id; Mac-Glue-0.58/blib/lib/Mac/AETE/Format/Glue.pm​: undef $self->{'NE'}; Mac-Glue-0.58/blib/lib/Mac/AETE/Format/Glue.pm​: $self->{N }{$self->{'NE'}}{$en}{id} = $id; Mac-Glue-0.58/blib/lib/Mac/AETE/Format/Glue.pm​: $self->{N }{$self->{'NE'}}{$en}{desc} = $desc; Mac-Glue-0.58/blib/lib/Mac/AETE/Format/Glue.pm​: $self->{DN}{$self->{'NE'}}{$en}{desc} = $desc; Net-Whois-1.9/Whois.pm​: 'NE' => 'NEBRASKA'\, Unicode-String-2.06/lib/Unicode/CharName.pm​:306D HIRAGANA LETTER NE Unicode-String-2.06/lib/Unicode/CharName.pm​:30CD KATAKANA LETTER NE Unicode-String-2.06/lib/Unicode/CharName.pm​:32E7 CIRCLED KATAKANA NE Unicode-String-2.06/lib/Unicode/CharName.pm​:FF88 HALFWIDTH KATAKANA LETTER NE WWW-Search-2.14/lib/WWW/Search/Infoseek.pm​: $WEB_HITS\, $WEB_NEXT\, $DESC_SPLIT) = qw( ST HE HI DE PE SI DA NE CN TR WH WN DS );

p5pRT commented 24 years ago

From @TimToady

Mark-Jason Dominus writes​: : > Perl unexpectedly complains about the use of NE in a script that resembles : > this one​: : > %test = ( : > NE => 'Nebraska'\, : : 'NE' is a long-dead synonym for 'ne'. The warning is probably : generated by the lexer as soon as the NE token is seen. It is : certainly a bug that the warning is generated for a token on the : left-hand side of the => operator; this might be fixable. : : But I think it might be better to just eliminate support for NE : entirely. Jarkko\, do you think this is the right approach? NE has : been deprecated since Perl 5.000.

I'd say kill it.

Larry

p5pRT commented 24 years ago

From [Unknown Contact. See original ticket]

Lightning flashed\, thunder crashed and Larry Wall \larry@​wall\.org whispered​: | I'd say kill it.

This is the first time in a long time that I've tried to submit a patch. Please check it over. It compiles and passes all tests on my machine\, including the original bug script.

-spp

Inline Patch ```diff diff -bBru perl-5.6.0/t/op/do.t perl-5.6.work/t/op/do.t --- perl-5.6.0/t/op/do.t Wed Mar 8 13:12:52 2000 +++ perl-5.6.work/t/op/do.t Tue Jul 18 14:23:52 2000 @@ -21,18 +21,18 @@ $_[0] = "not ok 1\n"; $result = do foo1("ok 1\n"); print "#2\t:$result: eq :value:\n"; -if ($result EQ 'value') { print "ok 2\n"; } else { print "not ok 2\n"; } -if ($_[0] EQ "not ok 1\n") { print "ok 3\n"; } else { print "not ok 3\n"; } +if ($result eq 'value') { print "ok 2\n"; } else { print "not ok 2\n"; } +if ($_[0] eq "not ok 1\n") { print "ok 3\n"; } else { print "not ok 3\n"; } $_[0] = "not ok 4\n"; $result = do foo2("not ok 4\n","ok 4\n","not ok 4\n"); print "#5\t:$result: eq :value:\n"; -if ($result EQ 'value') { print "ok 5\n"; } else { print "not ok 5\n"; } -if ($_[0] EQ "not ok 4\n") { print "ok 6\n"; } else { print "not ok 6\n"; } +if ($result eq 'value') { print "ok 5\n"; } else { print "not ok 5\n"; } +if ($_[0] eq "not ok 4\n") { print "ok 6\n"; } else { print "not ok 6\n"; } $result = do{print "ok 7\n"; 'value';}; print "#8\t:$result: eq :value:\n"; -if ($result EQ 'value') { print "ok 8\n"; } else { print "not ok 8\n"; } +if ($result eq 'value') { print "ok 8\n"; } else { print "not ok 8\n"; } sub blather { print @_; diff -bBru perl-5.6.0/t/pragma/warn/2use perl-5.6.work/t/pragma/warn/2use --- perl-5.6.0/t/pragma/warn/2use Mon Mar 13 05:32:18 2000 +++ perl-5.6.work/t/pragma/warn/2use Tue Jul 18 15:11:53 2000 @@ -12,28 +12,6 @@ BEGIN failed--compilation aborted at - line 3. ######## -# Check compile time scope of pragma -use warnings 'deprecated' ; -{ - no warnings ; - 1 if $a EQ $b ; -} -1 if $a EQ $b ; -EXPECT -Use of EQ is deprecated at - line 8. -######## - -# Check compile time scope of pragma -no warnings; -{ - use warnings 'deprecated' ; - 1 if $a EQ $b ; -} -1 if $a EQ $b ; -EXPECT -Use of EQ is deprecated at - line 6. -######## - # Check runtime scope of pragma use warnings 'uninitialized' ; { @@ -67,55 +45,27 @@ Use of uninitialized value in scalar chop at - line 6. ######## -use warnings 'deprecated' ; -1 if $a EQ $b ; -EXPECT -Use of EQ is deprecated at - line 3. -######## - --FILE-- abc -1 if $a EQ $b ; +1 if $a eq $b ; 1; --FILE-- -use warnings 'deprecated' ; require "./abc"; EXPECT ######## --FILE-- abc -use warnings 'deprecated' ; 1; --FILE-- require "./abc"; -1 if $a EQ $b ; +1 if $a eq $b ; EXPECT ######## ---FILE-- abc -use warnings 'deprecated' ; -1 if $a EQ $b ; -1; ---FILE-- -use warnings 'uninitialized' ; -require "./abc"; -my $a ; chop $a ; -EXPECT -Use of EQ is deprecated at ./abc line 2. -Use of uninitialized value in scalar chop at - line 3. -######## - ---FILE-- abc.pm -use warnings 'deprecated' ; -1 if $a EQ $b ; -1; ---FILE-- use warnings 'uninitialized' ; -use abc; my $a ; chop $a ; EXPECT -Use of EQ is deprecated at abc.pm line 2. Use of uninitialized value in scalar chop at - line 3. ######## @@ -164,49 +114,6 @@ # Check scope of pragma with eval no warnings ; -eval { - 1 if $a EQ $b ; -}; print STDERR $@ ; -1 if $a EQ $b ; -EXPECT - -######## - -# Check scope of pragma with eval -no warnings ; -eval { - use warnings 'deprecated' ; - 1 if $a EQ $b ; -}; print STDERR $@ ; -1 if $a EQ $b ; -EXPECT -Use of EQ is deprecated at - line 6. -######## - -# Check scope of pragma with eval -use warnings 'deprecated' ; -eval { - 1 if $a EQ $b ; -}; print STDERR $@ ; -1 if $a EQ $b ; -EXPECT -Use of EQ is deprecated at - line 5. -Use of EQ is deprecated at - line 7. -######## - -# Check scope of pragma with eval -use warnings 'deprecated' ; -eval { - no warnings ; - 1 if $a EQ $b ; -}; print STDERR $@ ; -1 if $a EQ $b ; -EXPECT -Use of EQ is deprecated at - line 8. -######## - -# Check scope of pragma with eval -no warnings ; eval ' my $b ; chop $b ; '; print STDERR $@ ; @@ -248,61 +155,10 @@ Use of uninitialized value in scalar chop at - line 8. ######## -# Check scope of pragma with eval -no warnings ; -eval ' - 1 if $a EQ $b ; -'; print STDERR $@ ; -1 if $a EQ $b ; -EXPECT - -######## - -# Check scope of pragma with eval -no warnings ; -eval q[ - use warnings 'deprecated' ; - 1 if $a EQ $b ; -]; print STDERR $@; -1 if $a EQ $b ; -EXPECT -Use of EQ is deprecated at (eval 1) line 3. -######## - -# Check scope of pragma with eval -use warnings 'deprecated' ; -eval ' - 1 if $a EQ $b ; -'; print STDERR $@; -1 if $a EQ $b ; -EXPECT -Use of EQ is deprecated at - line 7. -Use of EQ is deprecated at (eval 1) line 2. -######## - -# Check scope of pragma with eval -use warnings 'deprecated' ; -eval ' - no warnings ; - 1 if $a EQ $b ; -'; print STDERR $@; -1 if $a EQ $b ; -EXPECT -Use of EQ is deprecated at - line 8. -######## - # Check the additive nature of the pragma -1 if $a EQ $b ; my $a ; chop $a ; -use warnings 'deprecated' ; -1 if $a EQ $b ; -my $b ; chop $b ; +use warnings 'deprecated'; use warnings 'uninitialized' ; -my $c ; chop $c ; -no warnings 'deprecated' ; -1 if $a EQ $b ; -EXPECT -Use of EQ is deprecated at - line 6. -Use of uninitialized value in scalar chop at - line 9. -Use of uninitialized value in string eq at - line 11. -Use of uninitialized value in string eq at - line 11. +my $b ; chop $b ; +EXPECT +Use of uninitialized value in scalar chop at - line 6. diff -bBru perl-5.6.0/t/pragma/warn/4lint perl-5.6.work/t/pragma/warn/4lint --- perl-5.6.0/t/pragma/warn/4lint Mon Dec 27 19:00:21 1999 +++ perl-5.6.work/t/pragma/warn/4lint Tue Jul 18 15:18:53 2000 @@ -4,12 +4,9 @@ -W # lint: check compile time $^W is zapped BEGIN { $^W = 0 ;} -$a = $b = 1 ; -$a = 1 if $a EQ $b ; close STDIN ; print STDIN "abc" ; EXPECT -Use of EQ is deprecated at - line 5. -print() on closed filehandle main::STDIN at - line 6. +print() on closed filehandle main::STDIN at - line 4. ######## -W # lint: check runtime $^W is zapped @@ -30,12 +27,9 @@ -W # lint: check "no warnings" is zapped no warnings ; -$a = $b = 1 ; -$a = 1 if $a EQ $b ; close STDIN ; print STDIN "abc" ; EXPECT -Use of EQ is deprecated at - line 5. -print() on closed filehandle main::STDIN at - line 6. +print() on closed filehandle main::STDIN at - line 4. ######## -W # lint: check "no warnings" is zapped @@ -57,56 +51,40 @@ ######## -W --FILE-- abc.pm -no warnings 'deprecated' ; -my ($a, $b) = (0,0); -1 if $a EQ $b ; 1; --FILE-- no warnings 'uninitialized' ; use abc; my $a ; chop $a ; EXPECT -Use of EQ is deprecated at abc.pm line 3. Use of uninitialized value in scalar chop at - line 3. ######## -W --FILE-- abc -no warnings 'deprecated' ; -my ($a, $b) = (0,0); -1 if $a EQ $b ; 1; --FILE-- no warnings 'uninitialized' ; require "./abc"; my $a ; chop $a ; EXPECT -Use of EQ is deprecated at ./abc line 3. Use of uninitialized value in scalar chop at - line 3. ######## -W --FILE-- abc.pm -BEGIN {$^W = 0} -my ($a, $b) = (0,0); -1 if $a EQ $b ; 1; --FILE-- $^W = 0 ; use abc; my $a ; chop $a ; EXPECT -Use of EQ is deprecated at abc.pm line 3. Use of uninitialized value in scalar chop at - line 3. ######## -W --FILE-- abc -BEGIN {$^W = 0} -my ($a, $b) = (0,0); -1 if $a EQ $b ; 1; --FILE-- $^W = 0 ; require "./abc"; my $a ; chop $a ; EXPECT -Use of EQ is deprecated at ./abc line 3. Use of uninitialized value in scalar chop at - line 3. diff -bBru perl-5.6.0/t/pragma/warn/5nolint perl-5.6.work/t/pragma/warn/5nolint --- perl-5.6.0/t/pragma/warn/5nolint Fri Dec 3 23:22:07 1999 +++ perl-5.6.work/t/pragma/warn/5nolint Tue Jul 18 14:45:21 2000 @@ -4,8 +4,6 @@ -X # nolint: check compile time $^W is zapped BEGIN { $^W = 1 ;} -$a = $b = 1 ; -$a = 1 if $a EQ $b ; close STDIN ; print STDIN "abc" ; EXPECT ######## @@ -26,8 +24,6 @@ -X # nolint: check "no warnings" is zapped use warnings ; -$a = $b = 1 ; -$a = 1 if $a EQ $b ; close STDIN ; print STDIN "abc" ; EXPECT ######## @@ -49,9 +45,6 @@ ######## -X --FILE-- abc.pm -use warnings 'deprecated' ; -my ($a, $b) = (0,0); -1 if $a EQ $b ; 1; --FILE-- use warnings 'uninitialized' ; @@ -61,9 +54,6 @@ ######## -X --FILE-- abc -use warnings 'deprecated' ; -my ($a, $b) = (0,0); -1 if $a EQ $b ; 1; --FILE-- use warnings 'uninitialized' ; @@ -73,9 +63,6 @@ ######## -X --FILE-- abc.pm -BEGIN {$^W = 1} -my ($a, $b) = (0,0); -1 if $a EQ $b ; 1; --FILE-- $^W = 1 ; @@ -85,9 +72,6 @@ ######## -X --FILE-- abc -BEGIN {$^W = 1} -my ($a, $b) = (0,0); -1 if $a EQ $b ; 1; --FILE-- $^W = 1 ; diff -bBru perl-5.6.0/t/pragma/warn/7fatal perl-5.6.work/t/pragma/warn/7fatal --- perl-5.6.0/t/pragma/warn/7fatal Wed Dec 8 01:23:15 1999 +++ perl-5.6.work/t/pragma/warn/7fatal Tue Jul 18 15:17:38 2000 @@ -2,18 +2,6 @@ __END__ -# Check compile time warning -use warnings FATAL => 'deprecated' ; -{ - no warnings ; - 1 if $a EQ $b ; -} -1 if $a EQ $b ; -print STDERR "The End.\n" ; -EXPECT -Use of EQ is deprecated at - line 8. -######## - # Check runtime scope of pragma use warnings FATAL => 'uninitialized' ; { @@ -38,51 +26,10 @@ Use of uninitialized value in scalar chop at - line 6. ######## ---FILE-- abc -1 if $a EQ $b ; -1; ---FILE-- -use warnings FATAL => 'deprecated' ; -require "./abc"; -EXPECT - -######## - ---FILE-- abc -use warnings FATAL => 'deprecated' ; -1; ---FILE-- -require "./abc"; -1 if $a EQ $b ; -EXPECT - -######## - ---FILE-- abc -use warnings 'deprecated' ; -1 if $a EQ $b ; -1; ---FILE-- use warnings FATAL => 'uninitialized' ; -require "./abc"; my $a ; chop $a ; print STDERR "The End.\n" ; EXPECT -Use of EQ is deprecated at ./abc line 2. -Use of uninitialized value in scalar chop at - line 3. -######## - ---FILE-- abc.pm -use warnings 'deprecated' ; -1 if $a EQ $b ; -1; ---FILE-- -use warnings FATAL => 'uninitialized' ; -use abc; -my $a ; chop $a ; -print STDERR "The End.\n" ; -EXPECT -Use of EQ is deprecated at abc.pm line 2. Use of uninitialized value in scalar chop at - line 3. ######## @@ -125,52 +72,6 @@ # Check scope of pragma with eval no warnings ; -eval { - use warnings FATAL => 'deprecated' ; - 1 if $a EQ $b ; -}; print STDERR "-- $@" ; -1 if $a EQ $b ; -print STDERR "The End.\n" ; -EXPECT -Use of EQ is deprecated at - line 6. -######## - -# Check scope of pragma with eval -use warnings FATAL => 'deprecated' ; -eval { - 1 if $a EQ $b ; -}; print STDERR "-- $@" ; -1 if $a EQ $b ; -print STDERR "The End.\n" ; -EXPECT -Use of EQ is deprecated at - line 5. -######## - -# Check scope of pragma with eval -use warnings FATAL => 'deprecated' ; -eval { - no warnings ; - 1 if $a EQ $b ; -}; print STDERR $@ ; -1 if $a EQ $b ; -print STDERR "The End.\n" ; -EXPECT -Use of EQ is deprecated at - line 8. -######## - -# Check scope of pragma with eval -no warnings ; -eval { - use warnings FATAL => 'deprecated' ; -}; print STDERR $@ ; -1 if $a EQ $b ; -print STDERR "The End.\n" ; -EXPECT -The End. -######## - -# Check scope of pragma with eval -no warnings ; eval q[ use warnings FATAL => 'uninitialized' ; my $b ; chop $b ; @@ -204,39 +105,3 @@ print STDERR "The End.\n" ; EXPECT Use of uninitialized value in scalar chop at - line 8. -######## - -# Check scope of pragma with eval -no warnings ; -eval q[ - use warnings FATAL => 'deprecated' ; - 1 if $a EQ $b ; -]; print STDERR "-- $@"; -1 if $a EQ $b ; -print STDERR "The End.\n" ; -EXPECT --- Use of EQ is deprecated at (eval 1) line 3. -The End. -######## - -# Check scope of pragma with eval -use warnings FATAL => 'deprecated' ; -eval ' - 1 if $a EQ $b ; -'; print STDERR "-- $@"; -print STDERR "The End.\n" ; -EXPECT --- Use of EQ is deprecated at (eval 1) line 2. -The End. -######## - -# Check scope of pragma with eval -use warnings FATAL => 'deprecated' ; -eval ' - no warnings ; - 1 if $a EQ $b ; -'; print STDERR "-- $@"; -1 if $a EQ $b ; -print STDERR "The End.\n" ; -EXPECT -Use of EQ is deprecated at - line 8. diff -bBru perl-5.6.0/t/pragma/warn/8signal perl-5.6.work/t/pragma/warn/8signal --- perl-5.6.0/t/pragma/warn/8signal Thu Mar 2 14:24:16 2000 +++ perl-5.6.work/t/pragma/warn/8signal Tue Jul 18 15:20:11 2000 @@ -6,13 +6,13 @@ # 8signal BEGIN { $| = 1; $SIG{__WARN__} = sub { print "WARN -- @_" } } BEGIN { $SIG{__DIE__} = sub { print "DIE -- @_" } } -1 if 1 EQ 2 ; -use warnings qw(deprecated) ; -1 if 1 EQ 2 ; -use warnings FATAL => qw(deprecated) ; -1 if 1 EQ 2 ; +1 if chop($a); +use warnings qw(uninitialized) ; +1 if chop($a); +use warnings FATAL => qw(uninitialized) ; +1 if chop($a); print "The End.\n" ; EXPECT -WARN -- Use of EQ is deprecated at - line 6. -DIE -- Use of EQ is deprecated at - line 8. -Use of EQ is deprecated at - line 8. +WARN -- Use of uninitialized value in scalar chop at - line 6. +DIE -- Use of uninitialized value in scalar chop at - line 8. +Use of uninitialized value in scalar chop at - line 8. diff -bBru perl-5.6.0/t/pragma/warn/toke perl-5.6.work/t/pragma/warn/toke --- perl-5.6.0/t/pragma/warn/toke Tue Feb 22 03:53:00 2000 +++ perl-5.6.work/t/pragma/warn/toke Tue Jul 18 14:38:48 2000 @@ -3,12 +3,6 @@ we seem to have lost a few ambiguous warnings!! - 1 if $a EQ $b ; - 1 if $a NE $b ; - 1 if $a LT $b ; - 1 if $a GT $b ; - 1 if $a GE $b ; - 1 if $a LE $b ; $a = <<; Use of comma-less variable list is deprecated (called 3 times via depcom) @@ -131,27 +125,6 @@ __END__ # toke.c -use warnings 'deprecated' ; -1 if $a EQ $b ; -1 if $a NE $b ; -1 if $a GT $b ; -1 if $a LT $b ; -1 if $a GE $b ; -1 if $a LE $b ; -no warnings 'deprecated' ; -1 if $a EQ $b ; -1 if $a NE $b ; -1 if $a GT $b ; -1 if $a LT $b ; -1 if $a GE $b ; -1 if $a LE $b ; -EXPECT -Use of EQ is deprecated at - line 3. -Use of NE is deprecated at - line 4. -Use of GT is deprecated at - line 5. -Use of LT is deprecated at - line 6. -Use of GE is deprecated at - line 7. -Use of LE is deprecated at - line 8. ######## # toke.c use warnings 'deprecated' ; diff -bBru perl-5.6.0/toke.c perl-5.6.work/toke.c --- perl-5.6.0/toke.c Tue Mar 21 00:30:21 2000 +++ perl-5.6.work/toke.c Tue Jul 18 14:20:30 2000 @@ -5076,7 +5076,6 @@ } break; case 'E': - if (strEQ(d,"EQ")) { deprecate(d); return -KEY_eq;} if (strEQ(d,"END")) return KEY_END; break; case 'e': @@ -5142,12 +5141,6 @@ break; } break; - case 'G': - if (len == 2) { - if (strEQ(d,"GT")) { deprecate(d); return -KEY_gt;} - if (strEQ(d,"GE")) { deprecate(d); return -KEY_ge;} - } - break; case 'g': if (strnEQ(d,"get",3)) { d += 3; @@ -5247,12 +5240,6 @@ if (strEQ(d,"kill")) return -KEY_kill; } break; - case 'L': - if (len == 2) { - if (strEQ(d,"LT")) { deprecate(d); return -KEY_lt;} - if (strEQ(d,"LE")) { deprecate(d); return -KEY_le;} - } - break; case 'l': switch (len) { case 2: @@ -5303,9 +5290,6 @@ if (strEQ(d,"msgsnd")) return -KEY_msgsnd; break; } - break; - case 'N': - if (strEQ(d,"NE")) { deprecate(d); return -KEY_ne;} break; case 'n': if (strEQ(d,"next")) return KEY_next; ```
p5pRT commented 24 years ago

From @pmqs

From​: Stephen P. Potter [mailto​:spp@​ds.net]

Lightning flashed\, thunder crashed and Larry Wall \larry@&#8203;wall\.org whispered​: | I'd say kill it.

This is the first time in a long time that I've tried to submit a patch. Please check it over. It compiles and passes all tests on my machine\, including the original bug script.

Uh oh! The majority of the tests you've removed from the warnings test harness are testing functionality of the pragma\, rather than the specific deprecated warnings.

Paul

p5pRT commented 24 years ago

From @jhi

On Wed\, Jul 19\, 2000 at 08​:05​:49PM +0100\, Paul Marquess wrote​:

From​: Stephen P. Potter [mailto​:spp@​ds.net]

Lightning flashed\, thunder crashed and Larry Wall \larry@&#8203;wall\.org whispered​: | I'd say kill it.

This is the first time in a long time that I've tried to submit a patch. Please check it over. It compiles and passes all tests on my machine\, including the original bug script.

Uh oh! The majority of the tests you've removed from the warnings test harness are testing functionality of the pragma\, rather than the specific deprecated warnings.

Paul

Could you rework the patch?

p5pRT commented 24 years ago

From @pmqs

From​: Jarkko Hietaniemi [mailto​:jhi@​iki.fi]

On Wed\, Jul 19\, 2000 at 08​:05​:49PM +0100\, Paul Marquess wrote​:

From​: Stephen P. Potter [mailto​:spp@​ds.net]

Lightning flashed\, thunder crashed and Larry Wall \larry@&#8203;wall\.org whispered​: | I'd say kill it.

This is the first time in a long time that I've tried to submit a patch. Please check it over. It compiles and passes all tests on my machine\, including the original bug script.

Uh oh! The majority of the tests you've removed from the warnings test harness are testing functionality of the pragma\, rather than the specific deprecated warnings.

Paul

Could you rework the patch?

Sure.

Paul

p5pRT commented 24 years ago

From @pmqs

...

Could you rework the patch?

Here you are.

Paul

begin 666 DEP.UUE M8F5G​:6X@​-C8T(&1E\<"YP871C​:"YG>@​I-)UA\,*"(G.4\_4T1@​8%8Q13PB65 X M-S%#.F C/3\<W14]65#@​V7U5/7B4B7E)@​/41)*3\<M6#)'\,ETR*4I("DTP.TI. M1#-+3DE$-SLM-D(I14!!\,TDD*3$\/5)\,3U]/+C$X2T(K.$941%!))3@​W*497 M2U-71E\<_+5$^4R\,*35=#63P^1B\,N65Q872$E+5M@​-RQ3)B14+5\O2UU9/V ] M*& M/C\,\/E8C6"8G0E)5.#XD35\Y8"5>.%A4(@​I-4UM?3T$Q-$5@​4EHV*TI7 M\,T@​]\,$A'\,%LL/S9?0D93+EA\,6"U)2V N6$PQ5"M38#\<X6T=0.3@​B2CA334P[ M"DU.+SXV+"\[8%TP*CA&25\V\,C!%0"%4(SM>4"58+5I22T8W14M!\,U8Y2%5- M4SA&)2)0/3 L*BI&\,5H\*BT*33$[3U-/\,45-7#Q*.U\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Y4R)63$1#/5=87C8Y M3%\,]/E5'2B\^\,B]3+54A8 I--6!1*2Q$\,%T_7U@​V+45*/U R1EHH.D=9+%- M-4Y\<*S520T)#3"PU)"$Y)BDB0S(P1R(_5B\<B0EM4."DY"DTD7E%.1#0F-ULS M7TA 0E-'.#E2/UHZ7DT_65!\<(4M"+%0Q450]5C)4/T5"-4 Z(48G.B-.7TDX M.5$H3#\<*34\K/2\]5$HV2CY!6F N-%0H759(4$Y%5BP[.B1*4E!\<+3(Q2$!2 M25@​O0E8X0RQ4*C@​C6#U$2TA*72(N1PI--DDH3$A@​/#9\<)SDJ34$G)T%'-#PK M0DU\,5U\<F)5@​H55(Y+E]+4$0C+D1+53%0-49/)C@​H5R@​G-R4C)"9?"DTL\,"\S M*C1(\,#XH5EQ?*& U.5HX)TLH0"8^24@​]720G-"\,A4TM$.4H_)SPS.E$I*"-1 M.6 K14\<]16 T-#X*35U.24H^+UM​:6D9(3U]66&!-62I$5S]76%Q/*T4F.5-> M2E@​D2RI(\,C5-.58P74XW-"A//3D^5UY​:)E)?40I-)392)"4M5UU((4%14SI\, M(4A​:23\<O62LW*5XK+R4R)SD_1BU(1%E\,-5Q$(S!-+E%;\,T-//C8L03=++4HN M"DTN3CU77#17/3@​U0BE$\,44R5C$A13=%72I\,)3==6B=&5C%#/% L*4P^\,4I? M62DG2U57*B5 )"\,K\,TP[6S *34-7.2Q\,1CLD3E-.7CM?\,TXR.$16+%XB6"U. M7&!7)3U\<62M\<44D^32LP2U\_2RTH53U\<-B\<L/5\\4"-?0@​I-+S ]*219(E9> M7D\<O4R\O*SXS)DU​:3$=.+4@​[6E@​D-%M15S%+\,EP_2BXO0CPG6UA7+RTC7S(C M*DM#4B53"DTH6C]​:)U(L*SM5.UU​:43@​V*")10#51*E@​R\,SU2*3(D2R922E\O M\,3$W6D]*1R-?-SH[7E@​M04H\\,TPE64\,*35\<^0"Y06#E74$%*/R-3.D=1/S\<I M)5LO)TLI8$M"\,"TA-$HR1BM 14PF1S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#A"/THR2$Y!.4TV*RI%13)+1BPZ34H^+DTG/& _*%I36C8B3U(] M/CQ/2TA​:1"XU5DPV\,E%'"CDV8$TQ-U E*34P/"\,T*3)>24LM*E]0/BY3(40Z /*28P8&!@​8& *8 IE;F0* ` end

p5pRT commented 24 years ago

From @jhi

On Wed\, Jul 26\, 2000 at 11​:40​:18PM +0100\, Paul Marquess wrote​:

...

Could you rework the patch?

Here you are.

Paul

And there it is.

(double uuencoded patch\, eh?)

p5pRT commented 24 years ago

From @pmqs

From​: Jarkko Hietaniemi [mailto​:jhi@​iki.fi]

On Wed\, Jul 26\, 2000 at 11​:40​:18PM +0100\, Paul Marquess wrote​:

...

Could you rework the patch?

Here you are.

Paul

And there it is.

(double uuencoded patch\, eh?)

Belt & Braces. :-)

Paul