summaryrefslogtreecommitdiff
path: root/pod/perldiag.pod
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>1998-05-14 23:11:05 +0000
committerGurusamy Sarathy <gsar@cpan.org>1998-05-14 23:11:05 +0000
commit7b8d334a971230040a212bc5038097b3f600a094 (patch)
treee0fd6231e06e9b8f7e54aae4cec4ead51585219a /pod/perldiag.pod
parent6ee623d521a149edc6574c512fa951a192cd086a (diff)
downloadperl-7b8d334a971230040a212bc5038097b3f600a094.tar.gz
[win32] merge change#897 from maintbranch
p4raw-link: @897 on //depot/maint-5.004/perl: f06f9b6fc5a686f0169ee2a91b32d5e7125a44ae p4raw-id: //depot/win32/perl@974
Diffstat (limited to 'pod/perldiag.pod')
-rw-r--r--pod/perldiag.pod31
1 files changed, 25 insertions, 6 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index dedde649a6..4808563782 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -1094,6 +1094,13 @@ a goto, or a loop control statement.
(W) You are exiting a substitution by unconventional means, such as
a return, a goto, or a loop control statement.
+=item Explicit blessing to '' (assuming package main)
+
+(W) You are blessing a reference to a zero length string. This has
+the effect of blessing the reference into the package main. This is
+usually not what you want. Consider providing a default target
+package, e.g. bless($ref, $p or 'MyPackage');
+
=item Fatal VMS error at %s, line %d
(P) An error peculiar to VMS. Something untoward happened in a VMS system
@@ -1919,7 +1926,7 @@ was string.
(P) The lexer got into a bad state while processing a case modifier.
-=item Pareneses missing around "%s" list
+=item Parentheses missing around "%s" list
(W) You said something like
@@ -1957,8 +1964,7 @@ the BSD version, which takes a pid.
(W) qw() lists contain items separated by whitespace; as with literal
strings, comment characters are not ignored, but are instead treated
as literal data. (You may have used different delimiters than the
-exclamation marks parentheses shown here; braces are also frequently
-used.)
+parentheses shown here; braces are also frequently used.)
You probably wrote something like this:
@@ -2075,6 +2081,18 @@ to use parens. In any case, a hash requires key/value B<pairs>.
%hash = ( one => 1, two => 2, ); # right
%hash = qw( one 1 two 2 ); # also fine
+=item Reference found where even-sized list expected
+
+(W) You gave a single reference where Perl was expecting a list with
+an even number of elements (for assignment to a hash). This
+usually means that you used the anon hash constructor when you meant
+to use parens. In any case, a hash requires key/value B<pairs>.
+
+ %hash = { one => 1, two => 2, }; # WRONG
+ %hash = [ qw/ an anon array / ]; # WRONG
+ %hash = ( one => 1, two => 2, ); # right
+ %hash = qw( one 1 two 2 ); # also fine
+
=item Reference miscount in sv_replace()
(W) The internal sv_replace() function was handed a new SV with a
@@ -2183,6 +2201,7 @@ or possibly some other missing operator, such as a comma.
Check your logic flow.
=item Sequence (? incomplete
+
(F) A regular expression ended with an incomplete extension (?.
See L<perlre>.
@@ -2641,7 +2660,7 @@ the name you call Perl by to C<perl_>, C<perl__>, and so on.
=item Unsupported function %s
-(F) This machines doesn't implement the indicated function, apparently.
+(F) This machine doesn't implement the indicated function, apparently.
At least, Configure doesn't think so.
=item Unsupported socket function "%s" called
@@ -2701,7 +2720,7 @@ a split() explicitly to an array (or list).
(D) As an (ahem) accidental feature, C<AUTOLOAD> subroutines are looked
up as methods (using the C<@ISA> hierarchy) even when the subroutines to
be autoloaded were called as plain functions (e.g. C<Foo::bar()>), not
-as methods (e.g. C<Foo->bar()> or C<$obj->bar()>).
+as methods (e.g. C<Foo-E<gt>bar()> or C<$obj-E<gt>bar()>).
This bug will be rectified in Perl 5.005, which will use method lookup
only for methods' C<AUTOLOAD>s. However, there is a significant base
@@ -2716,7 +2735,7 @@ C<BaseClass>, execute C<*AUTOLOAD = \&BaseClass::AUTOLOAD> during startup.
In code that currently says C<use AutoLoader; @ISA = qw(AutoLoader);> you
should remove AutoLoader from @ISA and change C<use AutoLoader;> to
-C<C<use AutoLoader 'AUTOLOAD';>.
+C<use AutoLoader 'AUTOLOAD';>.
=item Use of %s is deprecated