diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-12-05 23:23:15 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-12-05 23:23:15 +0000 |
commit | 2606a0dc070bd05b308410521c0fb4d6012eae62 (patch) | |
tree | c540582b0fdb652a968ca0d1bbd397506174115b /perl-install | |
parent | ef311fe2b48ac21837475056cc4d118c8eea20e8 (diff) | |
download | drakx-backup-do-not-use-2606a0dc070bd05b308410521c0fb4d6012eae62.tar drakx-backup-do-not-use-2606a0dc070bd05b308410521c0fb4d6012eae62.tar.gz drakx-backup-do-not-use-2606a0dc070bd05b308410521c0fb4d6012eae62.tar.bz2 drakx-backup-do-not-use-2606a0dc070bd05b308410521c0fb4d6012eae62.tar.xz drakx-backup-do-not-use-2606a0dc070bd05b308410521c0fb4d6012eae62.zip |
parameter passing using $_ is bad
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/bootloader.pm | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/perl-install/bootloader.pm b/perl-install/bootloader.pm index e2ba67f29..329760a48 100644 --- a/perl-install/bootloader.pm +++ b/perl-install/bootloader.pm @@ -879,13 +879,14 @@ sub dev2bios { my $start = substr($where, 0, 2); my $translate = sub { - $_ eq $where ? "aaa" : #- if exact match, value it first - /^$start(.*)/ ? "ad$1" : #- if same class (ide/scsi/ultra66), value it before other classes - $_; + my ($dev) = @_; + $dev eq $where ? "aaa" : #- if exact match, value it first + $dev =~ /^$start(.*)/ ? "ad$1" : #- if same class (ide/scsi/ultra66), value it before other classes + $dev; }; @dev = map { $_->[0] } sort { $a->[1] cmp $b->[1] } - map { [ $_, &$translate ] } @dev; + map { [ $_, $translate->($_) ] } @dev; s/x(d.)/h$1/ foreach @dev; #- switch back; |