This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add the new stat(@array) diagnostic to perldiag
authorTony Cook <tony@develop-help.com>
Wed, 30 Mar 2016 05:48:40 +0000 (16:48 +1100)
committerRicardo Signes <rjbs@cpan.org>
Thu, 7 Apr 2016 11:45:09 +0000 (07:45 -0400)
pod/perldiag.pod

index 777226f..941a108 100644 (file)
@@ -216,6 +216,11 @@ operator which expects either a number or a string matching
 C</^[a-zA-Z]*[0-9]*\z/>.  See L<perlop/Auto-increment and
 Auto-decrement> for details.
 
+=item Array passed to stat will be coerced to a scalar (did you want stat $_[0]?)
+
+(W syntax) You called stat() on an array, but the array will be
+coerced to a scalar - the number of elements in the array.
+
 =item assertion botched: %s
 
 (X) The malloc package that comes with Perl had an internal failure.