From 3e6f55b7b4e4b22a9b0b70febc8fc9c564b99b85 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 20 Oct 2005 13:44:28 +0000 Subject: Adapt loop exit in callback in level of nesting --- urpmf | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/urpmf b/urpmf index 8186b4e8..8bd50603 100755 --- a/urpmf +++ b/urpmf @@ -147,9 +147,10 @@ while ($callback =~ /%[-\d]*(\w+)/g) { } } $callback =~ s/%([-\d]*)(\w+)/%${1}s/g; -$uniq and $uniq = "\n" . ' $uniq{$_} and return 1; $uniq{$_} = 1;'; +my $next_st = $multi ? 'next' : 'return 1'; +$uniq and $uniq = "\n" . ' $uniq{$_} and ' . $next_st . '; $uniq{$_} = 1;'; $callback .= qq<$sprintfargs); - $expr or return 1;$uniq + $expr or $next_st;$uniq print;>; $callback .= "\n }" if $multi; $callback .= "\n 1;\n}"; -- cgit v1.2.1