summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakids
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-08-12 12:02:01 +0000
committerOlivier Blin <oblin@mandriva.org>2005-08-12 12:02:01 +0000
commit04da399df8e3415f260fb0f44adae049d9671814 (patch)
tree00c631970a84e628e3cdca8065fddba509bc5002 /perl-install/standalone/drakids
parent9b4d12a82e53c0141f7306eb1f4c59ae343bf3ec (diff)
downloaddrakx-backup-do-not-use-04da399df8e3415f260fb0f44adae049d9671814.tar
drakx-backup-do-not-use-04da399df8e3415f260fb0f44adae049d9671814.tar.gz
drakx-backup-do-not-use-04da399df8e3415f260fb0f44adae049d9671814.tar.bz2
drakx-backup-do-not-use-04da399df8e3415f260fb0f44adae049d9671814.tar.xz
drakx-backup-do-not-use-04da399df8e3415f260fb0f44adae049d9671814.zip
improve list removal workaround using a copying grep
Diffstat (limited to 'perl-install/standalone/drakids')
-rw-r--r--perl-install/standalone/drakids6
1 files changed, 2 insertions, 4 deletions
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