From c1e398be894ecce6394bd76c99b76c022979ac62 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Mon, 11 Nov 2002 13:29:44 +0000 Subject: various small syntax enhancements to please perl_checker --- perl-install/Xconfig/xfreeX.pm | 4 ++-- perl-install/common.pm | 2 +- perl-install/interactive/stdio.pm | 2 +- perl-install/network/ethernet.pm | 2 +- perl-install/partition_table/raw.pm | 2 +- perl-install/raid.pm | 2 +- perl-install/resize_fat/fat.pm | 4 ++-- perl-install/security/msec.pm | 4 ++-- perl-install/standalone/draksplash | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/perl-install/Xconfig/xfreeX.pm b/perl-install/Xconfig/xfreeX.pm index e809e693b..ca2f91423 100644 --- a/perl-install/Xconfig/xfreeX.pm +++ b/perl-install/Xconfig/xfreeX.pm @@ -319,7 +319,7 @@ sub ModeLine_from_string { our @resolutions = ('640x480', '800x600', '1024x768', if_(arch() =~ /ppc/, '1152x768'), '1152x864', '1280x960', '1280x1024', '1400x1050', '1600x1200', '1920x1440', '2048x1536'); -our $default_header = << 'END'; +our $default_header = <<'END'; # File generated by XFdrake. # ********************************************************************** @@ -341,7 +341,7 @@ Section "ServerFlags" EndSection END -our $default_ModeLine = arch() =~ /ppc/ ? << 'END_PPC' : << 'END'; +our $default_ModeLine = arch() =~ /ppc/ ? <<'END_PPC' : <<'END'; # Apple iMac modes ModeLine "1024x768" 78.525 1024 1049 1145 1312 768 769 772 800 +hsync +vsync ModeLine "800x600" 62.357 800 821 901 1040 600 601 604 632 +hsync +vsync diff --git a/perl-install/common.pm b/perl-install/common.pm index 58872df01..6dd6f279c 100644 --- a/perl-install/common.pm +++ b/perl-install/common.pm @@ -37,7 +37,7 @@ sub salt { open F, devices::make("random") or die "missing random"; my $s; read F, $s, $nb; local $_ = pack "b8" x $nb, unpack "b6" x $nb, $s; - tr [\0-\x3f] [0-9a-zA-Z./]; + tr|\0-\x3f|0-9a-zA-Z./|; $_; } diff --git a/perl-install/interactive/stdio.pm b/perl-install/interactive/stdio.pm index 10e749205..737b966f7 100644 --- a/perl-install/interactive/stdio.pm +++ b/perl-install/interactive/stdio.pm @@ -115,7 +115,7 @@ ask_fromW_begin: print "* "; $common->{title} and print "$common->{title}\n"; - print map { "$_\n" } @{$common->{messages}}; + print(map { "$_\n" } @{$common->{messages}}); $predo_widget->($_) foreach @$l; if (listlength(@$l) > 30) { diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index 82b5ff82f..ae5c8755b 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -88,7 +88,7 @@ sub conf_network_card { @all_cards == () and $in->ask_warn('', N("No ethernet network adapter has been detected on your system. I cannot set up this connection type.")) and return; @all_cards == 1 and $interface = $all_cards[0][0] and goto l1; - again : + again: $interface = $in->ask_from_list(N("Choose the network interface"), N("Please choose which network adapter you want to use to connect to Internet"), [ map { $_->[0] . ($_->[1] ? " (using module $_->[1])" : "") } @all_cards ] diff --git a/perl-install/partition_table/raw.pm b/perl-install/partition_table/raw.pm index 454aa0856..d9a672bce 100644 --- a/perl-install/partition_table/raw.pm +++ b/perl-install/partition_table/raw.pm @@ -36,7 +36,7 @@ if_(arch() =~ /ppc/, [ 'freebsd', 0x160, "\x6A\x10\x89\xE6\x48\x80\xCC\x40\xCD\x13" ], [ 'dummy', 0xAC, "\x0E\xB3\x07\x56\xCD\x10\x5E\xEB" ], #- caldera? [ 'ranish', 0x100, "\x6A\x10\xB4\x42\x8B\xF4\xCD\x13\x8B\xE5\x73" ], - [ 'os2', 0x1c2, "\xA" ], + [ 'os2', 0x1c2, "\x0A" ], [ 'Acronis', 0, "\xE8\x12\x01" ], ); diff --git a/perl-install/raid.pm b/perl-install/raid.pm index 0de96e912..1cc1720be 100644 --- a/perl-install/raid.pm +++ b/perl-install/raid.pm @@ -108,7 +108,7 @@ sub write { open F, ">$file" or die N("Can't write file %s", $file); foreach (grep { $_ } @$raids) { - print F <<"EOF"; + print F <{device} raid-level $_->{level} chunk-size $_->{'chunk-size'} diff --git a/perl-install/resize_fat/fat.pm b/perl-install/resize_fat/fat.pm index fdf0c2ac8..27252ef2b 100644 --- a/perl-install/resize_fat/fat.pm +++ b/perl-install/resize_fat/fat.pm @@ -89,9 +89,9 @@ sub endianness($$) { my ($val, $nb_bits) = @_; my $r = 0; for (; $nb_bits > 0; $nb_bits -= 8) { - $r <<= 8; + $r = $r << 8; $r += $val & 0xff; - $val >>= 8; + $val = $val >> 8; } $nb_bits < 0 and die "error: endianness only handle numbers divisible by 8"; $r; diff --git a/perl-install/security/msec.pm b/perl-install/security/msec.pm index c069fba35..76142da0d 100644 --- a/perl-install/security/msec.pm +++ b/perl-install/security/msec.pm @@ -103,11 +103,11 @@ sub get_value { if (-e $item_file) { open F, $item_file; while() { - if($_ =~ /^$item/) { + if ($_ =~ /^$item/) { if ($category eq 'functions') { my $i = $_; (undef, $_) = split /\(/; - tr /()//d; + tr/()//d; $value = $_; $_ = $i; } elsif ($category eq 'checks') { diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash index 8455e8d74..69da21275 100755 --- a/perl-install/standalone/draksplash +++ b/perl-install/standalone/draksplash @@ -169,7 +169,7 @@ $first{'widgets'}{'combo'}{'res'}->entry->signal_connect( changed => sub { #- image file selection for new theme $first{'widgets'}{'button'}{'file'}->signal_connect( clicked =>sub{ my $file_dialog = new Gtk::FileSelection('choose image'); - $file_dialog->set_filename( ( $first{'widgets'}{'label'}{'file'}->get ne N("choose image file") )?$first{'widgets'}{'label'}{'file'}->get:'~/' ); + $file_dialog->set_filename( ( $first{'widgets'}{'label'}{'file'}->get ne N("choose image file") ) ? $first{'widgets'}{'label'}{'file'}->get : '~/' ); $file_dialog->cancel_button->signal_connect( clicked => sub{ $file_dialog->destroy} ); $file_dialog->ok_button->signal_connect( clicked => sub{ $first{'widgets'}{'label'}{'file'}->set_text($file_dialog->get_filename) ; $file_dialog->destroy ;}); $file_dialog->show; -- cgit v1.2.1