diff options
author | Simon Glover <scog@roe.ac.uk> | 2002-02-26 17:56:42 +0000 |
---|---|---|
committer | Abhijit Menon-Sen <ams@wiw.org> | 2002-02-26 23:51:52 +0000 |
commit | ed9aa3b75c508a7baf4c55afe519cd2c35782757 (patch) | |
tree | 815457357767df3e73113972fae24246f2ba7477 | |
parent | 3ca925874f58afe830847e3aaacb8dbda2bdcc03 (diff) | |
download | perl-ed9aa3b75c508a7baf4c55afe519cd2c35782757.tar.gz |
Subject: Missing diagnostics
Date: Tue, 26 Feb 2002 17:56:42 +0000 (BST)
Message-Id: <Pine.GSO.4.10.10202261754170.23317-100000@muinntiarach.roe.ac.uk>
Subject: [PATCH] Better wording for the lvalue vec diagnostic
From: Simon Glover <scog@roe.ac.uk>
Date: Tue, 26 Feb 2002 18:08:04 +0000 (BST)
Message-Id: <Pine.GSO.4.10.10202261756560.23317-100000@muinntiarach.roe.ac.uk>
p4raw-id: //depot/perl@14887
-rw-r--r-- | doop.c | 2 | ||||
-rw-r--r-- | pod/perldiag.pod | 27 | ||||
-rwxr-xr-x | t/op/vec.t | 2 |
3 files changed, 24 insertions, 7 deletions
@@ -872,7 +872,7 @@ Perl_do_vecset(pTHX_ SV *sv) lval = SvUV(sv); offset = LvTARGOFF(sv); if (offset < 0) - Perl_croak(aTHX_ "Assigning to negative offset in vec"); + Perl_croak(aTHX_ "Negative offset to vec in lvalue context"); size = LvTARGLEN(sv); if (size < 1 || (size & (size-1))) /* size < 1 or not a power of two */ Perl_croak(aTHX_ "Illegal number of bits in vec"); diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 56c843e08e..9db2807b59 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1,3 +1,4 @@ +//depot/perl/pod/perldiag.pod#272 - edit change 14824 (text) =head1 NAME perldiag - various Perl diagnostics @@ -182,11 +183,6 @@ spots. This is now heavily deprecated. must either both be scalars or both be lists. Otherwise Perl won't know which context to supply to the right side. -=item Negative offset to vec in lvalue context - -(F) When C<vec> is called in an lvalue context, the second argument must be -greater than or equal to zero. - =item Attempt to access key '%_' in fixed hash (F) A hash has been marked as READONLY at the C level to turn it @@ -1351,6 +1347,10 @@ Perl identifier. If you're just trying to glob a long list of filenames, try using the glob() operator, or put the filenames into a variable and glob that. +=item exec? I'm not *that* kind of operating system + +(F) The C<exec> function is not implemented in MacPerl. See L<perlport>. + =item Execution of %s aborted due to compilation errors (F) The final summary message when a Perl compilation fails. @@ -2030,6 +2030,13 @@ couldn't be created for some peculiar reason. you omitted the name of the module. Consult L<perlrun> for full details about C<-M> and C<-m>. +=item More than one argument to open + +(F) The C<open> function has been asked to open multiple files. This +can happen if you are trying to open a pipe to a command that takes a +list of arguments, but have forgotten to specify a piped open mode. +See L<perlfunc/open> for details. + =item msg%s not implemented (F) You don't have System V message IPC on your system. @@ -2079,6 +2086,11 @@ provided for this purpose. (F) You tried to do a read/write/send/recv operation with a buffer length that is less than 0. This is difficult to imagine. +=item Negative offset to vec in lvalue context + +(F) When C<vec> is called in an lvalue context, the second argument must be +greater than or equal to zero. + =item Nested quantifiers in regex; marked by <-- HERE in m/%s/ (F) You can't quantify a quantifier without intervening parentheses. So @@ -2926,6 +2938,11 @@ in L<perlos2>. (S prototype) The subroutine being declared or defined had previously been declared or defined with a different function prototype. +=item Prototype not terminated + +(F) You've omitted the closing parenthesis in a function prototype +definition. + =item Quantifier in {,} bigger than %d in regex; marked by <-- HERE in m/%s/ diff --git a/t/op/vec.t b/t/op/vec.t index 4b8934d7a2..67d7527412 100755 --- a/t/op/vec.t +++ b/t/op/vec.t @@ -46,7 +46,7 @@ $x = eval { vec $foo, 0, -13 }; print "not " if defined $x or $@ !~ /^Illegal number of bits in vec/; print "ok 21\n"; $x = eval { vec($foo, -1, 4) = 2 }; -print "not " if defined $x or $@ !~ /^Assigning to negative offset in vec/; +print "not " if defined $x or $@ !~ /^Negative offset to vec in lvalue context/; print "ok 22\n"; print "not " if vec('abcd', 7, 8); print "ok 23\n"; |