From 81f539976d18ddbbedd2478d305e109a8aea7213 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 May 2012 18:27:10 +0000 Subject: (init_mouse) split it out of main() --- perl-install/install/install2.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'perl-install/install/install2.pm') diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm index 3170d17c4..c3fb2fe03 100644 --- a/perl-install/install/install2.pm +++ b/perl-install/install/install2.pm @@ -530,6 +530,11 @@ sub init_env_share() { } } +sub init_mouse() { + eval { $o->{mouse} = mouse::detect($o->{modules_conf}) } if !$o->{mouse} && !$o->{nomouseprobe}; + mouse::load_modules($o->{mouse}); +} + sub process_auto_steps() { foreach (@::auto_steps) { if (my $s = $o->{steps}{/::(.*)/ ? $1 : $_}) { @@ -631,10 +636,7 @@ sub main { devices::make('tty') if $o->{interactive} eq "curses"; #- needed very early for install::steps_gtk - if (!$::testing) { - eval { $o->{mouse} = mouse::detect($o->{modules_conf}) } if !$o->{mouse} && !$o->{nomouseprobe}; - mouse::load_modules($o->{mouse}); - } + init_mouse() if !$::testing; #- for auto_install compatibility with old $o->{lang}, #- and also for --lang and --flang -- cgit v1.2.1