This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a10e04b
)
Avoid ++ in test.pl
author
Dagfinn Ilmari Mannsåker
<ilmari@ilmari.org>
Thu, 15 Jun 2017 15:14:06 +0000
(16:14 +0100)
committer
Dagfinn Ilmari Mannsåker
<ilmari@ilmari.org>
Thu, 15 Jun 2017 15:15:45 +0000
(16:15 +0100)
The header comment warns to keep it simple, and specifically against
++ due to its cleverness for string magic auto-increment, but a couple
of places had missed the memo.
t/test.pl
patch
|
blob
|
blame
|
history
diff --git
a/t/test.pl
b/t/test.pl
index
d86f633
..
79e6e25
100644
(file)
--- a/
t/test.pl
+++ b/
t/test.pl
@@
-860,7
+860,7
@@
sub unlink_all {
if( -f $file ){
_print_stderr "# Couldn't unlink '$file': $!\n";
}else{
- ++$count;
+ $count = $count + 1; # don't use ++
}
}
$count;
@@
-1141,7
+1141,7
@@
sub setup_multiple_progs {
my $found;
while (<$fh>) {
if (/^__END__/) {
- ++$found;
+ $found = $found + 1; # don't use ++
last;
}
}