]> git.vpit.fr Git - perl/modules/Test-Leaner.git/commitdiff
Directly test the truth of $ok in ok()
authorVincent Pit <vince@profvince.com>
Fri, 21 Jan 2011 11:16:26 +0000 (12:16 +0100)
committerVincent Pit <vince@profvince.com>
Fri, 21 Jan 2011 11:16:26 +0000 (12:16 +0100)
lib/Test/Leaner.pm

index 2ada2039793d8fe96e4cf97a9bd6d61298491c6c..b07fbcac25b8e29e9418b09f32bbcaaa3c465a6c 100644 (file)
@@ -408,10 +408,10 @@ sub ok ($;$) {
  ++$test;
 
  my $test_str = "ok $test";
unless ($ok) {
$ok or do {
   $test_str   = "not $test_str";
   ++$failed;
- }
+ };
  if (defined $desc) {
   _sanitize_comment($desc);
   $test_str .= " - $desc" if length $desc;