summaryrefslogtreecommitdiffstats
path: root/perl-install/interactive
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-27 20:50:12 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-27 20:50:12 +0000
commitb0d554c4155060ed665844fdf7b2a08db9bb3356 (patch)
treed1236029c2ac147b49a2da74bf132c3f56619406 /perl-install/interactive
parentc2b148e1e94892d8d72000ed087b607ae28b5808 (diff)
downloaddrakx-b0d554c4155060ed665844fdf7b2a08db9bb3356.tar
drakx-b0d554c4155060ed665844fdf7b2a08db9bb3356.tar.gz
drakx-b0d554c4155060ed665844fdf7b2a08db9bb3356.tar.bz2
drakx-b0d554c4155060ed665844fdf7b2a08db9bb3356.tar.xz
drakx-b0d554c4155060ed665844fdf7b2a08db9bb3356.zip
perl_checker adaptations
Diffstat (limited to 'perl-install/interactive')
-rw-r--r--perl-install/interactive/http.pm24
-rw-r--r--perl-install/interactive/newt.pm2
-rw-r--r--perl-install/interactive/stdio.pm6
3 files changed, 16 insertions, 16 deletions
diff --git a/perl-install/interactive/http.pm b/perl-install/interactive/http.pm
index 33deb4b22..359e61401 100644
--- a/perl-install/interactive/http.pm
+++ b/perl-install/interactive/http.pm
@@ -27,7 +27,7 @@ sub open_stdout {
# cont_stdout must be called after open_stdout and before the first print
sub cont_stdout {
my ($title) = @_;
- print CGI::start_html(-title => $title) if $no_header;
+ print CGI::start_html('-title' => $title) if $no_header;
$no_header = 0;
}
@@ -49,7 +49,7 @@ sub end() {
close STDOUT;
unlink $pipe_r, $pipe_w;
}
-sub exit() { end; exit($_[1]) }
+sub exit() { end(); exit($_[1]) }
END { end() }
sub ask_fromW {
@@ -64,7 +64,7 @@ sub ask_fromW {
# print $q->img({ -src => "/icons/$o->{icon}" }) if $o->{icon};
print @{$common->{messages}};
- print $q->start_form(-name => 'form', -action => $script_name, -method => 'post');
+ print $q->start_form('-name' => 'form', '-action' => $script_name, '-method' => 'post');
print "<table>\n";
@@ -79,21 +79,21 @@ sub ask_fromW {
$e->{type} = $e->{not_edit} ? 'list' : 'entry' if $e->{type} eq 'combo';
if ($e->{type} eq 'bool') {
- print $q->checkbox(-name => "w$::i", -checked => ${$e->{val}} && 'on', -label => $e->{text} || " ");
+ print $q->checkbox('-name' => "w$::i", '-checked' => ${$e->{val}} && 'on', '-label' => $e->{text} || " ");
} elsif ($e->{type} eq 'button') {
print "nobuttonyet";
} elsif ($e->{type} =~ /list/) {
my %t;
$t{$_} = may_apply($e->{format}, $_) foreach @{$e->{list}};
- print $q->scrolling_list(-name => "w$::i",
- -values => $e->{list},
- -default => [ ${$e->{val}} ],
- -size => 5, -multiple => '', -labels => \%t);
+ print $q->scrolling_list('-name' => "w$::i",
+ '-values' => $e->{list},
+ '-default' => [ ${$e->{val}} ],
+ '-size' => 5, '-multiple' => '', '-labels' => \%t);
} else {
print $e->{hidden} ?
- $q->password_field(-name => "w$::i", -default => ${$e->{val}}) :
- $q->textfield( -name => "w$::i", -default => ${$e->{val}});
+ $q->password_field('-name' => "w$::i", '-default' => ${$e->{val}}) :
+ $q->textfield( '-name' => "w$::i", '-default' => ${$e->{val}});
}
print "</td></tr>\n";
@@ -101,8 +101,8 @@ sub ask_fromW {
print "</table>\n";
print $q->p();
- print $q->submit(-name => 'ok_submit', -value => $common->{ok} || N("Ok"));
- print $q->submit(-name => 'cancel_submit', -value => $common->{cancel} || N("Cancel")) if $common->{cancel} || !exists $common->{ok};
+ print $q->submit('-name' => 'ok_submit', '-value' => $common->{ok} || N("Ok"));
+ print $q->submit('-name' => 'cancel_submit', '-value' => $common->{cancel} || N("Cancel")) if $common->{cancel} || !exists $common->{ok};
print $q->hidden('state'), $q->hidden('uid');
print $q->end_form, $q->end_html;
diff --git a/perl-install/interactive/newt.pm b/perl-install/interactive/newt.pm
index 2f5f18791..46f9797e5 100644
--- a/perl-install/interactive/newt.pm
+++ b/perl-install/interactive/newt.pm
@@ -28,7 +28,7 @@ sub leave_console { Newt::Resume() }
sub suspend { Newt::Suspend() }
sub resume { Newt::Resume() }
sub end() { Newt::Finished() }
-sub exit() { end; exit($_[1]) }
+sub exit() { end(); exit($_[1]) }
END { end() }
sub myTextbox {
diff --git a/perl-install/interactive/stdio.pm b/perl-install/interactive/stdio.pm
index 2abe2d5c9..b43d3591d 100644
--- a/perl-install/interactive/stdio.pm
+++ b/perl-install/interactive/stdio.pm
@@ -61,7 +61,7 @@ ask_fromW_begin:
};
my @labels;
- my $format_label = sub { my ($e) = @_; return "`${$e->{val}}' $e->{label} $e->{text}\n" };
+ my $format_label = sub { my ($e) = @_; return sprintf("`%s' %s %s\n", ${$e->{val}}, $e->{label}, $e->{text}) };
my $do_widget = sub {
my ($e, $ind) = @_;
@@ -106,10 +106,10 @@ ask_fromW_begin:
my $i = readln();
${$e->{val}} = $i || ${$e->{val}};
${$e->{val}} = '' if ${$e->{val}} eq 'void';
- print "Setting to <${$e->{val}}>\n";
+ print "Setting to <", ${$e->{val}}, ">\n";
$i and $common->{callbacks}{changed}->($ind);
} else {
- print "UNSUPPORTED WIDGET TYPE (type <$e->{type}> label <$e->{label}> text <$e->{text}> val <${$e->{val}}>\n";
+ printf "UNSUPPORTED WIDGET TYPE (type <%s> label <%s> text <%s> val <%s>\n", $e->{type}, $e->{label}, $e->{text}, ${$e->{val}};
}
};