summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive/curses.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-23 19:50:35 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-23 19:50:35 +0000
commitf4bc86bc94aeeeffb8a82b16b38b760590b80bdf (patch)
treeb5a904657487cd5dfec16ca195ee72b9098a086f /perl-install/interactive/curses.pm
parentcb09d79bc963f95780d214aa12e695d8f9e338e2 (diff)
downloaddrakx-f4bc86bc94aeeeffb8a82b16b38b760590b80bdf.tar
drakx-f4bc86bc94aeeeffb8a82b16b38b760590b80bdf.tar.gz
drakx-f4bc86bc94aeeeffb8a82b16b38b760590b80bdf.tar.bz2
drakx-f4bc86bc94aeeeffb8a82b16b38b760590b80bdf.tar.xz
drakx-f4bc86bc94aeeeffb8a82b16b38b760590b80bdf.zip
perl_checker cleanups
Diffstat (limited to 'perl-install/interactive/curses.pm')
-rw-r--r--perl-install/interactive/curses.pm14
1 files changed, 7 insertions, 7 deletions
diff --git a/perl-install/interactive/curses.pm b/perl-install/interactive/curses.pm
index 9a50522aa..81e0f0459 100644
--- a/perl-install/interactive/curses.pm
+++ b/perl-install/interactive/curses.pm
@@ -34,9 +34,9 @@ sub new {
$cui ||= Curses::UI->new('-color_support' => 1);
# Set some default terminal size, for serial install
- unless ($cui->{-width}) {
- $cui->{-width} = $cui->{-w} = $cui->{-bw} = 80;
- $cui->{-height} = $cui->{-h} = $cui->{-bh} = 25;
+ unless ($cui->{'-width'}) {
+ $cui->{'-width'} = $cui->{'-w'} = $cui->{'-bw'} = 80;
+ $cui->{'-height'} = $cui->{'-h'} = $cui->{'-bh'} = 25;
}
bless { cui => $cui }, $class;
@@ -552,7 +552,7 @@ sub ask_fileW {
$dir = $opts->{directory} || $opts->{file} && dirname($opts->{file});
- if($opts->{save}) {
+ if ($opts->{save}) {
$file = $o->{cui}->savefilebrowser('-title' => $opts->{title}, '-path' => $dir, '-file' => basename($file));
} else {
$file = $o->{cui}->loadfilebrowser('-title' => $opts->{title}, '-path' => $dir, '-file' => basename($file));
@@ -561,13 +561,13 @@ sub ask_fileW {
my $err;
if (!$file) {
$err = N("No file chosen");
- } elsif(-f $file && $opts->{want_a_dir}) {
+ } elsif (-f $file && $opts->{want_a_dir}) {
$file = dirname($file);
- } elsif(-d $file && !$opts->{want_a_dir}) {
+ } elsif (-d $file && !$opts->{want_a_dir}) {
$err = N("You have chosen a directory, not a file");
} elsif (!-e $file && !$opts->{save}) {
$err = $opts->{want_a_dir} ? N("No such directory") : N("No such file");
- };
+ }
$err and $o->ask_warn('', $err) or $file;
}