summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-05 12:26:59 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-05 12:26:59 +0000
commit96279a0b9750c1d757b48c40cd1f17b5a60ea014 (patch)
treecd560f727a90ded832cfd5480f248848006f73d0 /perl-install
parent3812fd80c231dba41da389d575547492c994552c (diff)
downloaddrakx-96279a0b9750c1d757b48c40cd1f17b5a60ea014.tar
drakx-96279a0b9750c1d757b48c40cd1f17b5a60ea014.tar.gz
drakx-96279a0b9750c1d757b48c40cd1f17b5a60ea014.tar.bz2
drakx-96279a0b9750c1d757b48c40cd1f17b5a60ea014.tar.xz
drakx-96279a0b9750c1d757b48c40cd1f17b5a60ea014.zip
use each_index instead of map_index when the return value is not used
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/bootloader.pm2
-rw-r--r--perl-install/install2.pm2
-rw-r--r--perl-install/interactive/gtk.pm2
-rw-r--r--perl-install/interactive/http.pm4
-rw-r--r--perl-install/interactive/newt.pm4
-rw-r--r--perl-install/interactive/stdio.pm8
-rw-r--r--perl-install/raid.pm2
-rw-r--r--perl-install/ugtk.pm4
8 files changed, 14 insertions, 14 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm
index 9a9470786..0e322efe1 100644
--- a/perl-install/bootloader.pm
+++ b/perl-install/bootloader.pm
@@ -940,7 +940,7 @@ sub write_grub_config {
output "$::prefix$once", " " x 100;
}
- map_index {
+ each_index {
print F "default $::i" if $_->{label} eq $lilo->{default};
} @{$lilo->{entries}};
diff --git a/perl-install/install2.pm b/perl-install/install2.pm
index e07d81c43..46dd6efca 100644
--- a/perl-install/install2.pm
+++ b/perl-install/install2.pm
@@ -510,7 +510,7 @@ sub main {
eval { modules::load("af_packet") };
- map_index {
+ each_index {
modules::add_alias("sound-slot-$::i", $_->{driver});
} modules::probe_category('multimedia/sound');
diff --git a/perl-install/interactive/gtk.pm b/perl-install/interactive/gtk.pm
index 32e42b496..108677366 100644
--- a/perl-install/interactive/gtk.pm
+++ b/perl-install/interactive/gtk.pm
@@ -283,7 +283,7 @@ sub create_list {
my $tips = new Gtk::Tooltips;
my $toselect;
- map_index {
+ each_index {
my $item = new Gtk::ListItem(may_apply($e->{format}, $_));
$item->signal_connect(key_press_event => sub {
my ($w, $event) = @_;
diff --git a/perl-install/interactive/http.pm b/perl-install/interactive/http.pm
index 42e116380..cc48ee19a 100644
--- a/perl-install/interactive/http.pm
+++ b/perl-install/interactive/http.pm
@@ -68,7 +68,7 @@ sub ask_fromW {
print "<table>\n";
- map_index {
+ each_index {
my $e = $_;
print "<tr><td>$e->{label}</td><td>\n";
@@ -120,7 +120,7 @@ sub ask_fromW {
print $q->h1(_("Error")), $q->p("Sorry, you can't go back");
goto redisplay;
}
- map_index {
+ each_index {
my $e = $_;
my $v = $q->param("w$::i");
if ($e->{type} eq 'bool') {
diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm
index 9493910e9..0f3dd7456 100644
--- a/perl-install/interactive/newt.pm
+++ b/perl-install/interactive/newt.pm
@@ -139,7 +139,7 @@ sub ask_fromW_real {
$get = sub { $w->ListboxGetCurrent };
$set = sub {
my ($val) = @_;
- map_index {
+ each_index {
$w->ListboxSetCurrent($::i) if $val eq $_;
} @{$e->{list}};
};
@@ -163,7 +163,7 @@ sub ask_fromW_real {
$set_all->();
my $grid = Newt::Grid::CreateGrid(3, max(1, int @$l));
- map_index {
+ each_index {
$grid->GridSetField(0, $::i, 1, ${Newt::Component::Label(-1, -1, $_->{e}{label})}, 0, 0, 1, 0, 1, 0);
$grid->GridSetField(1, $::i, 1, ${$_->{real_w}}, 0, 0, 0, 0, 1, 0);
} @widgets;
diff --git a/perl-install/interactive/stdio.pm b/perl-install/interactive/stdio.pm
index 3c8e9cfb7..635adfb83 100644
--- a/perl-install/interactive/stdio.pm
+++ b/perl-install/interactive/stdio.pm
@@ -117,7 +117,7 @@ ask_fromW_begin:
$common->{title} and print "$common->{title}\n";
print map { "$_\n" } @{$common->{messages}};
- $predo_widget->($_) foreach (@$l);
+ $predo_widget->($_) foreach @$l;
if (listlength(@$l) > 30) {
my $ll = listlength(@$l);
print _("=> There are many things to choose from (%s).\n", $ll);
@@ -128,15 +128,15 @@ or just hit Enter to proceed.
Your choice? ");
my $i = readln();
if (check_it($i, $ll)) {
- map_index { $do_widget->($_, $::i) } grep_index { $::i >= $i-1 && $::i < $i+9 } @$l;
+ each_index { $do_widget->($_, $::i) } grep_index { $::i >= $i-1 && $::i < $i+9 } @$l;
goto ask_fromW_handle_verylonglist;
}
} else {
- map_index { $do_widget->($_, $::i) } @$l;
+ each_index { $do_widget->($_, $::i) } @$l;
}
my $lab;
- map_index { $labels[$::i] && (($lab = $format_label->($_)) ne $labels[$::i]) and print _("=> Notice, a label changed:\n%s", $lab) }
+ each_index { $labels[$::i] && (($lab = $format_label->($_)) ne $labels[$::i]) and print _("=> Notice, a label changed:\n%s", $lab) }
grep { $_->{type} eq 'label' } @$l;
my $i;
diff --git a/perl-install/raid.pm b/perl-install/raid.pm
index 048de72f1..39c843ed9 100644
--- a/perl-install/raid.pm
+++ b/perl-install/raid.pm
@@ -115,7 +115,7 @@ chunk-size $_->{'chunk-size'}
persistent-superblock 1
EOF
print F "nr-raid-disks ", int @{$_->{disks}};
- map_index {
+ each_index {
print F " device ", devices::make($_->{device});
print F " raid-disk $::i";
} @{$_->{disks}};
diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm
index 9e8af572a..01613c9fb 100644
--- a/perl-install/ugtk.pm
+++ b/perl-install/ugtk.pm
@@ -340,9 +340,9 @@ sub create_notebook {
sub create_packtable {
my ($options, @l) = @_;
my $w = new Gtk::Table(0, 0, $options->{homogeneous} || 0);
- map_index {
+ each_index {
my ($i, $l) = ($_[0], $_);
- map_index {
+ each_index {
my ($j) = @_;
if ($_) {
ref $_ or $_ = new Gtk::Label($_);