Change 14962 by jhi@alpha on 2002/03/03 15:06:55
Remove the bogus "incorrect case" warning completely.
The problem exists, but the cure, in which ever form
it will be, needs to be something more subtle.
Affected files ...
.... //depot/perl/op.c#487 edit
.... //depot/perl/pod/perldiag.pod#278 edit
Differences ...
==== //depot/perl/op.c#487 (text) ====
Index: perl/op.c
--- perl/op.c.~1~ Sun Mar 3 08:15:05 2002
+++ perl/op.c Sun Mar 3 08:15:05 2002
@@ -3451,13 +3451,22 @@
newSTATEOP(0, Nullch, imop) ));
if (packname) {
-#ifdef WIN32
- if (ckWARN(WARN_MISC) && !gv_stashpvn(packname, packlen, FALSE)) {
- Perl_warner(aTHX_ WARN_MISC,
- "Package `%s' not found "
- "(did you use the incorrect case?)", packname);
- }
-#endif
+ /* The "did you use incorrect case?" warning used to be here.
+ * The problem is that on case-insensitive filesystems one
+ * might get false positives for "use" (and "require"):
+ * "use Strict" or "require CARP" will work. This causes
+ * portability problems for the script: in case-strict
+ * filesystems the script will stop working.
+ *
+ * The "incorrect case" warning checked whether "use Foo"
+ * imported "Foo" to your namespace, but that is wrong, too:
+ * there is no requirement nor promise in the language that
+ * a Foo.pm should or would contain anything in package "Foo".
+ *
+ * There is very little Configure-wise that can be done, either:
+ * the case-sensitivity of the build filesystem of Perl does not
+ * help in guessing the case-sensitivity of the runtime environment.
+ */
safefree(packname);
}
==== //depot/perl/pod/perldiag.pod#278 (text) ====
Index: perl/pod/perldiag.pod
--- perl/pod/perldiag.pod.~1~ Sun Mar 3 08:15:05 2002
+++ perl/pod/perldiag.pod Sun Mar 3 08:15:05 2002
@@ -2510,12 +2510,6 @@
some day, even though it doesn't yet. Perhaps you should use a
mixed-case attribute name, instead. See L<attributes>.
-=item Package '%s' not found (did you use the incorrect case?)
-
-(W misc) You included a package file via C<use>, but the package name
-did not match the file name. It's possible that you misspelled the
-package name.
-
=item page overflow
(W io) A single call to write() produced more lines than can fit on a
End of Patch.