[perl-Gnome2-Rsvg] Do not use 'my $var if 0' hack



commit 1c345b122edb847ae3c4de3d16f9baaf75b37fd4
Author: Torsten Schönfeld <kaffeetisch gmx de>
Date:   Mon May 17 22:09:00 2010 +0200

    Do not use 'my $var if 0' hack

 t/Rsvg.t |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/t/Rsvg.t b/t/Rsvg.t
index 5df416d..150067f 100644
--- a/t/Rsvg.t
+++ b/t/Rsvg.t
@@ -5,12 +5,11 @@ use Gnome2::Rsvg;
 
 my $number = qr/^\d+$/;
 
+my $been_here = 0;
 my $size_callback = sub {
   my ($width, $height) = @_;
 
-  my $been_here = 0 if 0;
-  unless ($been_here) {
-    $been_here = 1;
+  unless ($been_here++) {
     like($width, $number);
     like($height, $number);
   }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]