add new warnings to perldelta
Gurusamy Sarathy [Mon, 24 Jan 2000 14:32:31 +0000 (14:32 +0000)]
p4raw-id: //depot/perl@4881

Changes
pod/perldelta.pod
pod/perldiag.pod

diff --git a/Changes b/Changes
index 701a192..d718777 100644 (file)
--- a/Changes
+++ b/Changes
@@ -79,6 +79,233 @@ Version v5.5.640        Development release working toward 5.6
 ----------------
 
 ____________________________________________________________________________
+[  4879] By: gsar                                  on 2000/01/24  14:14:20
+        Log: force linkage of the function wrappers for globals in change#4878
+     Branch: perl
+          ! embed.pl globals.c perlapi.h win32/win32.h
+____________________________________________________________________________
+[  4878] By: gsar                                  on 2000/01/24  13:04:45
+        Log: enable function wrappers for access to globals under MULTIPLICITY
+             (provides binary compatibility in the face of changes in interpreter
+             structure)
+     Branch: perl
+          ! Makefile.SH XSUB.h cflags.SH embed.pl makedef.pl objXSUB.h
+          ! perl.h perlapi.c perlapi.h win32/Makefile win32/makefile.mk
+____________________________________________________________________________
+[  4877] By: jhi                                   on 2000/01/24  11:41:57
+        Log: perlhist update.
+     Branch: cfgperl
+          ! pod/perlhist.pod
+____________________________________________________________________________
+[  4876] By: jhi                                   on 2000/01/24  11:32:07
+        Log: Updates on the large file support status.
+     Branch: cfgperl
+          ! pod/perldelta.pod
+____________________________________________________________________________
+[  4875] By: jhi                                   on 2000/01/24  11:23:16
+        Log: Integrate with Sarathy.
+     Branch: cfgperl
+         !> ext/DB_File/Makefile.PL ext/NDBM_File/NDBM_File.pm
+         !> ext/ODBM_File/ODBM_File.pm lib/AutoSplit.pm
+         !> lib/Math/Complex.pm lib/Math/Trig.pm lib/Shell.pm
+____________________________________________________________________________
+[  4874] By: gsar                                  on 2000/01/24  10:43:03
+        Log: fix typos; avoid use constant for lowercase constants (produces
+             warnings now)
+     Branch: perl
+          ! ext/DB_File/Makefile.PL lib/Math/Complex.pm lib/Math/Trig.pm
+          ! lib/Shell.pm
+____________________________________________________________________________
+[  4873] By: gsar                                  on 2000/01/24  09:40:24
+        Log: avoid warnings when there's no subs to autosplit
+     Branch: perl
+          ! lib/AutoSplit.pm
+____________________________________________________________________________
+[  4872] By: jhi                                   on 2000/01/24  09:39:01
+        Log: Create a tool for converting a config_h.SH into a VOS config.h.
+     Branch: cfgperl
+          + vos/config.def vos/config.pl
+          ! MANIFEST vos/config.h vos/config_h.SH_orig
+____________________________________________________________________________
+[  4871] By: gsar                                  on 2000/01/24  09:15:20
+        Log: typos in change#4623
+     Branch: perl
+          ! ext/NDBM_File/NDBM_File.pm ext/ODBM_File/ODBM_File.pm
+____________________________________________________________________________
+[  4870] By: jhi                                   on 2000/01/24  06:43:19
+        Log: Sync metaconfig units to comply with the typo fixes of #4869. 
+     Branch: cfgperl
+          ! Configure config_h.SH
+     Branch: metaconfig
+          + U/modified/cf_email.U U/modified/so.U
+     Branch: metaconfig/U/perl
+          ! dlsrc.U
+____________________________________________________________________________
+[  4869] By: jhi                                   on 2000/01/24  06:04:31
+        Log: Integrate with Sarathy.
+     Branch: cfgperl
+         +> t/pragma/diagnostics.t
+         !> (integrate 120 files)
+____________________________________________________________________________
+[  4868] By: gsar                                  on 2000/01/23  21:49:28
+        Log: on windows, set seek position to end for files opened in append mode
+             (improves compatibility with Unix, avoids buffering issues)
+     Branch: perl
+          ! win32/win32.c
+____________________________________________________________________________
+[  4867] By: gsar                                  on 2000/01/23  21:19:31
+        Log: change#4866 was flawed; revert and add better fix for warning
+     Branch: perl
+          ! op.c op.h
+____________________________________________________________________________
+[  4866] By: gsar                                  on 2000/01/23  20:43:56
+        Log: optimize away runtime code for our($foo) (also avoid warnings)
+     Branch: perl
+          ! op.c
+____________________________________________________________________________
+[  4865] By: gsar                                  on 2000/01/23  13:17:18
+        Log: DB_File 1.72 update from Paul Marquess <paul.marquess@bt.com>
+     Branch: perl
+          ! ext/DB_File/Changes ext/DB_File/DB_File.pm
+          ! ext/DB_File/DB_File.xs ext/DB_File/version.c
+____________________________________________________________________________
+[  4864] By: gsar                                  on 2000/01/23  13:12:31
+        Log: system('VAR123=foo cmd') wasn't invoking shell (de-locale-ized patch
+             suggested by Dominic Dunlop <domo@computer.org>)
+     Branch: perl
+          ! doio.c
+____________________________________________________________________________
+[  4863] By: gsar                                  on 2000/01/23  13:01:35
+        Log: fix misclassified warnings
+     Branch: perl
+          ! pod/perldiag.pod
+____________________________________________________________________________
+[  4862] By: gsar                                  on 2000/01/23  12:52:12
+        Log: document bareword prototype incompatibility
+     Branch: perl
+          ! pod/perldelta.pod pod/perlsub.pod
+____________________________________________________________________________
+[  4861] By: gsar                                  on 2000/01/23  12:32:25
+        Log: faulty edit
+     Branch: perl
+          ! lib/File/stat.pm
+____________________________________________________________________________
+[  4860] By: gsar                                  on 2000/01/23  12:23:48
+        Log: s/use vars/our/g modules that aren't independently maintained on CPAN
+     Branch: perl
+          ! ext/B/B/Asmdata.pm ext/Data/Dumper/Dumper.pm
+          ! ext/Devel/DProf/DProf.pm ext/Fcntl/Fcntl.pm
+          ! ext/File/Glob/Glob.pm ext/GDBM_File/GDBM_File.pm
+          ! ext/IO/lib/IO/Dir.pm ext/IO/lib/IO/File.pm
+          ! ext/IO/lib/IO/Handle.pm ext/IO/lib/IO/Pipe.pm
+          ! ext/IO/lib/IO/Poll.pm ext/IO/lib/IO/Seekable.pm
+          ! ext/IO/lib/IO/Socket.pm ext/IO/lib/IO/Socket/INET.pm
+          ! ext/IO/lib/IO/Socket/UNIX.pm ext/NDBM_File/NDBM_File.pm
+          ! ext/ODBM_File/ODBM_File.pm ext/Opcode/Opcode.pm
+          ! ext/Opcode/Safe.pm ext/POSIX/POSIX.pm
+          ! ext/SDBM_File/SDBM_File.pm ext/Socket/Socket.pm
+          ! ext/Thread/Thread.pm lib/AnyDBM_File.pm lib/AutoLoader.pm
+          ! lib/AutoSplit.pm lib/Class/Struct.pm lib/Dumpvalue.pm
+          ! lib/ExtUtils/Command.pm lib/ExtUtils/Install.pm
+          ! lib/ExtUtils/Installed.pm lib/ExtUtils/Liblist.pm
+          ! lib/ExtUtils/MM_VMS.pm lib/ExtUtils/Mksymlists.pm
+          ! lib/ExtUtils/Packlist.pm lib/Fatal.pm lib/File/Basename.pm
+          ! lib/File/Compare.pm lib/File/Copy.pm lib/File/Find.pm
+          ! lib/File/Path.pm lib/File/stat.pm lib/FileHandle.pm
+          ! lib/Math/Complex.pm lib/Math/Trig.pm lib/Net/Ping.pm
+          ! lib/Net/hostent.pm lib/Net/netent.pm lib/Net/protoent.pm
+          ! lib/Net/servent.pm lib/Shell.pm lib/Test.pm
+          ! lib/Test/Harness.pm lib/Tie/Array.pm lib/Tie/Handle.pm
+          ! lib/Time/gmtime.pm lib/Time/localtime.pm lib/User/grent.pm
+          ! lib/User/pwent.pm lib/base.pm lib/caller.pm lib/constant.pm
+          ! lib/diagnostics.pm lib/fields.pm lib/lib.pm lib/strict.pm
+____________________________________________________________________________
+[  4859] By: gsar                                  on 2000/01/23  11:29:22
+        Log: fix diagnostics to report "our" vs "my" correctly
+     Branch: perl
+          ! op.c pod/perldiag.pod
+____________________________________________________________________________
+[  4858] By: gsar                                  on 2000/01/23  10:14:46
+        Log: set api_version to 5.5.0 (binary compatibility needs to get tested
+             more widely)
+     Branch: perl
+          ! patchlevel.h
+____________________________________________________________________________
+[  4857] By: gsar                                  on 2000/01/23  10:04:03
+        Log: disallow our($foo::bar)
+     Branch: perl
+          ! pod/perldiag.pod toke.c
+____________________________________________________________________________
+[  4856] By: gsar                                  on 2000/01/23  09:50:54
+        Log: dprofpp can't find Devel::DProf::VERSION due to change#4852
+     Branch: perl
+          ! utils/dprofpp.PL
+____________________________________________________________________________
+[  4855] By: gsar                                  on 2000/01/23  09:36:51
+        Log: new test (from Michael G Schwern <schwern@pobox.com>)
+     Branch: perl
+          + t/pragma/diagnostics.t
+          ! MANIFEST
+____________________________________________________________________________
+[  4854] By: gsar                                  on 2000/01/23  09:24:40
+        Log: add PREREQ_PM to default template (suggested by Michael G Schwern
+             <schwern@pobox.com>)
+     Branch: perl
+          ! utils/h2xs.PL
+____________________________________________________________________________
+[  4853] By: gsar                                  on 2000/01/23  09:08:30
+        Log: cygwin update (from Eric Fifer <EFifer@sanwaint.com>)
+     Branch: perl
+          ! cygwin/Makefile.SHs hints/cygwin.sh t/io/tell.t
+____________________________________________________________________________
+[  4852] By: gsar                                  on 2000/01/23  08:52:44
+        Log: mark some extensions as "special versions" to avoid CPAN indexer
+             confusion (from Ilya Zakharevich)
+     Branch: perl
+          ! ext/Devel/DProf/DProf.pm ext/Devel/Peek/Peek.pm
+____________________________________________________________________________
+[  4851] By: gsar                                  on 2000/01/23  08:48:46
+        Log: prefer POSIX::uname() rather than syscalls, which require attempting
+             to load syscall.ph (from David Huggins-Daines <dhd@eradicator.org>)
+     Branch: perl
+          ! lib/Sys/Hostname.pm
+____________________________________________________________________________
+[  4850] By: gsar                                  on 2000/01/23  08:36:43
+        Log: integrate cfgperl contents into mainline
+     Branch: perl
+         !> Configure Policy_sh.SH Porting/Glossary Porting/config.sh
+         !> Porting/config_H config_h.SH perl.h
+____________________________________________________________________________
+[  4849] By: gsar                                  on 2000/01/23  08:17:30
+        Log: fix localization in while BLOCK when there is a continue BLOCK
+             by introducing an explicit scope (c.f. change#4848)
+     Branch: perl
+          ! op.c pp_ctl.c t/cmd/while.t
+____________________________________________________________________________
+[  4848] By: gsar                                  on 2000/01/23  06:43:51
+        Log: fix scope cleanup when next jumps to a continue block; this is rather
+             in the nature of a kludge; it doesn't fix the longstanding bug that
+             makes C<while (!$x++) { local $x = 7 } continue { print $x }> print "7"
+             instead of "1")
+     Branch: perl
+          ! pp_ctl.c t/cmd/while.t
+____________________________________________________________________________
+[  4847] By: gsar                                  on 2000/01/23  04:47:25
+        Log: don't warn about masked lexical in C<if (my $x = 1) { my $x; }>,
+             C<while (my $x = foo()) { my $x = bar(); }> etc.
+     Branch: perl
+          ! op.c
+____________________________________________________________________________
+[  4846] By: gsar                                  on 2000/01/23  04:44:17
+        Log: avoid warnings in change#4839
+     Branch: perl
+          ! lib/Carp/Heavy.pm
+____________________________________________________________________________
+[  4845] By: gsar                                  on 2000/01/22  13:12:38
+        Log: Configure typos (from Ray Phillips <r.phillips@mailbox.uq.edu.au>)
+     Branch: perl
+          ! Changes Configure
+____________________________________________________________________________
 [  4844] By: gsar                                  on 2000/01/22  12:46:26
         Log: wrong category for exec() warning
      Branch: perl
index f99aa3c..b90db4c 100644 (file)
@@ -1554,6 +1554,14 @@ A tutorial on managing class data for object modules.
 (F) Lexically scoped subroutines are not yet implemented.  Don't try that
 yet.
 
+=item "%s" variable %s masks earlier declaration in same %s
+
+(W) A "my" or "our" variable has been redeclared in the current scope or statement,
+effectively eliminating all access to the previous instance.  This is almost
+always a typographical error.  Note that the earlier variable will still exist
+until the end of the scope or until all closure referents to it are
+destroyed.
+
 =item '!' allowed only after types %s
 
 (F) The '!' is allowed in pack() and unpack() only after certain types.
@@ -1612,6 +1620,25 @@ definition ahead of the call to get proper prototype checking.  Alternatively,
 if you are certain that you're calling the function correctly, you may put
 an ampersand before the name to avoid the warning.  See L<perlsub>.
 
+=item %s argument is not a HASH or ARRAY element
+
+(F) The argument to exists() must be a hash or array element, such as:
+
+    $foo{$bar}
+    $ref->[12]->["susie"]
+
+=item %s argument is not a HASH or ARRAY element or slice
+
+(F) The argument to delete() must be either a hash or array element, such as:
+
+    $foo{$bar}
+    $ref->[12]->["susie"]
+
+or a hash or array slice, such as:
+
+    @foo[$bar, $baz, $xyzzy]
+    @{$ref->[12]}{"susie", "queue"}
+
 =item %s argument is not a subroutine name
 
 (F) The argument to exists() for C<exists &sub> must be a subroutine
@@ -1679,6 +1706,17 @@ so it was truncated to the string shown.
 
 (P) For some reason you can't check the filesystem of the script for nosuid.
 
+=item Can't declare class for non-scalar %s in "%s"
+
+(S) Currently, only scalar variables can declared with a specific class
+qualifier in a "my" or "our" declaration.  The semantics may be extended
+for other types of variables in future.
+
+=item Can't declare %s in "%s"
+
+(F) Only scalar, array, and hash variables may be declared as "my" or
+"our" variables.  They must have ordinary identifiers as names.
+
 =item Can't ignore signal CHLD, forcing to default
 
 (W) Perl has detected that it is being run with the SIGCHLD signal
@@ -1788,6 +1826,19 @@ intended it to be a read/write filehandle, you needed to open it with
 you intended only to read from the file, use "E<lt>".  See
 L<perlfunc/open>.
 
+=item flock() on closed filehandle %s
+
+(W) The filehandle you're attempting to flock() got itself closed some
+time before now.  Check your logic flow.  flock() operates on filehandles.
+Are you attempting to call flock() on a dirhandle by the same name?
+
+=item Global symbol "%s" requires explicit package name
+
+(F) You've said "use strict vars", which indicates that all variables
+must either be lexically scoped (using "my"), declared beforehand using
+"our", or explicitly qualified to say which package the global variable
+is in (using "::").
+
 =item Hexadecimal number > 0xffffffff non-portable
 
 (W) The hexadecimal number you specified is larger than 2**32-1
@@ -1891,6 +1942,22 @@ construction, but the command was missing or blank.
 (F) The reserved syntax for lexically scoped subroutines requires that they
 have a name with which they can be found.
 
+=item No %s specified for -%c
+
+(F) The indicated command line switch needs a mandatory argument, but
+you haven't specified one.
+
+=item No package name allowed for variable %s in "our"
+
+(F) Fully qualified variable names are not allowed in "our" declarations,
+because that doesn't make much sense under existing semantics.  Such
+syntax is reserved for future extensions.
+
+=item No space allowed after -%c
+
+(F) The argument to the indicated command line switch must follow immediately
+after the switch, without intervening spaces.
+
 =item no UTC offset information; assuming local time is UTC
 
 (S) A warning peculiar to VMS.  Perl was unable to find the local
@@ -1921,6 +1988,18 @@ reference.
 (P) Failed an internal consistency check while trying to reset all weak
 references to an object.
 
+=item Parentheses missing around "%s" list
+
+(W) You said something like
+
+    my $foo, $bar = @_;
+
+when you meant
+
+    my ($foo, $bar) = @_;
+
+Remember that "my", "our" and "local" bind closer than comma.
+
 =item Possible Y2K bug: %s
 
 (W) You are concatenating the number 19 with another number, which
index d1e64f4..2c0f04a 100644 (file)
@@ -1464,6 +1464,12 @@ a literal "at" sign, or was meant to introduce a variable name
 that happens to be missing.  So you have to put either the backslash or
 the name.
 
+=item flock() on closed filehandle %s
+
+(W) The filehandle you're attempting to flock() got itself closed some
+time before now.  Check your logic flow.  flock() operates on filehandles.
+Are you attempting to call flock() on a dirhandle by the same name?
+
 =item Format %s redefined
 
 (W) You redefined a format.  To suppress this warning, say
@@ -3580,10 +3586,4 @@ in F<README.os2>.
 
 =back
 
-=item flock() on closed filehandle %s
-
-(W) The filehandle you're attempting to flock() got itself closed some
-time before now.  Check your logic flow.  flock() operates on filehandles.
-Are you attempting to call flock() on a dirhandle by the same name?
-
-=back
+=cut