vfmg (DEVEL): vfmg - use named loop

sparky sparky at pld-linux.org
Wed Jan 4 16:31:32 CET 2006


Author: sparky                       Date: Wed Jan  4 15:31:32 2006 GMT
Module: vfmg                          Tag: DEVEL
---- Log message:
- use named loop

---- Files affected:
vfmg:
   vfmg (1.73.2.50 -> 1.73.2.51) 

---- Diffs:

================================================================
Index: vfmg/vfmg
diff -u vfmg/vfmg:1.73.2.50 vfmg/vfmg:1.73.2.51
--- vfmg/vfmg:1.73.2.50	Sat Dec 31 19:37:29 2005
+++ vfmg/vfmg	Wed Jan  4 16:31:27 2006
@@ -380,17 +380,16 @@
 		$tags{Exec} = $_;
 	}
 	if ( $opt{icons_ext} ) {
-		my $exists=0;
-		foreach my $dir (@icondirs) {
+		my $exists = 0;
+		ALLDIRS: foreach my $dir (@icondirs) {
 			foreach my $ext ('', qw(.svg .xpm .png)) {
 				if (-f $dir . $tags{Icon} . $ext) {
 					$tags{Icon} .= $ext;
 					$tags{Icon} = $dir . $tags{Icon} if $opt{icons_full};
-					$exists=1;
-					last;
+					$exists = 1;
+					last ALLDIRS;
 				}
 			}
-			last if ($exists);
 		}
 		$tags{Icon} = '' unless $exists;
 	}
@@ -695,19 +694,18 @@
 			}
 			if ($ok) {
 				if($opt{icons_ext}) {
-					my $exists=0;
-					foreach my $dir (@icondirs) {
+					my $exists = 0;
+					ALLDIRS: foreach my $dir (@icondirs) {
 						foreach my $ext ('', qw(.svg .xpm .png)) {
 							if (-f $dir . $icon . $ext) {
 								$icon .= $ext;
 								$icon = $dir . $icon if $opt{icons_full};
 								$exists = 1;
-								last;
+								last ALLDIRS;
 							}
 						}
-						last if $exists;
 					}
-					$icon="" unless $exists;
+					$icon = '' unless $exists;
 				}
 				my $utfname;
 				if(length $dname) {
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/vfmg/vfmg?r1=1.73.2.50&r2=1.73.2.51&f=u



More information about the pld-cvs-commit mailing list