From 04da399df8e3415f260fb0f44adae049d9671814 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Fri, 12 Aug 2005 12:02:01 +0000 Subject: improve list removal workaround using a copying grep --- perl-install/standalone/drakids | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'perl-install') diff --git a/perl-install/standalone/drakids b/perl-install/standalone/drakids index 8bfcf6704..9ed6c2edf 100644 --- a/perl-install/standalone/drakids +++ b/perl-install/standalone/drakids @@ -99,10 +99,8 @@ sub handle_init() { sub list_remove_addr { my ($list, @addr) = @_; - #- workaround buggy Gtk2::SimpleList array abstraction, it corrupts references - foreach (0 .. $#{$list}) { - member($list->[$_][0], @addr) and splice @$list, $_, 1; - } + #- workaround buggy Gtk2::SimpleList array abstraction, it destroys references + @$list = map { member($_->[0], @addr) ? () : [ @$_ ] } @$list; } #- may throw an exception -- cgit v1.2.1