summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-11-18 16:44:52 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-11-18 16:44:52 +0000
commite9746d5b1868e7ecdbabce94c47325e05c2f666d (patch)
tree0c1d2ca28c1c3c7fbddb81d4b3d29572895bded7 /perl-install
parentc7a67d1bcbcffaadbbb06be8f11e78e7508eed02 (diff)
downloaddrakx-e9746d5b1868e7ecdbabce94c47325e05c2f666d.tar
drakx-e9746d5b1868e7ecdbabce94c47325e05c2f666d.tar.gz
drakx-e9746d5b1868e7ecdbabce94c47325e05c2f666d.tar.bz2
drakx-e9746d5b1868e7ecdbabce94c47325e05c2f666d.tar.xz
drakx-e9746d5b1868e7ecdbabce94c47325e05c2f666d.zip
make perl_checker happy
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfig/card.pm2
-rw-r--r--perl-install/Xconfig/monitor.pm2
-rw-r--r--perl-install/bootlook.pm4
-rw-r--r--perl-install/harddrake/sound.pm2
-rw-r--r--perl-install/harddrake/ui.pm2
-rw-r--r--perl-install/network/adsl.pm8
-rw-r--r--perl-install/network/isdn.pm2
-rw-r--r--perl-install/network/netconnect.pm2
-rw-r--r--perl-install/pkgs.pm4
-rw-r--r--perl-install/printer/detect.pm2
-rw-r--r--perl-install/printer/gimp.pm10
-rw-r--r--perl-install/printer/main.pm4
-rw-r--r--perl-install/printer/office.pm6
-rw-r--r--perl-install/printer/printerdrake.pm43
-rw-r--r--perl-install/standalone.pm2
15 files changed, 46 insertions, 49 deletions
diff --git a/perl-install/Xconfig/card.pm b/perl-install/Xconfig/card.pm
index 870ba3f22..79853c5b5 100644
--- a/perl-install/Xconfig/card.pm
+++ b/perl-install/Xconfig/card.pm
@@ -270,7 +270,7 @@ sub configure {
my ($in, $raw_X, $do_pkgs, $auto, $options) = @_;
my @cards = probe();
- @cards or @cards = ({});
+ @cards or @cards = {};
if (!$cards[0]{server} && !$cards[0]{Driver} || !$auto) {
card_config__not_listed($in, $cards[0], $options) or return;
diff --git a/perl-install/Xconfig/monitor.pm b/perl-install/Xconfig/monitor.pm
index dedac149c..135e1865f 100644
--- a/perl-install/Xconfig/monitor.pm
+++ b/perl-install/Xconfig/monitor.pm
@@ -73,7 +73,7 @@ sub choose {
configure_automatic($monitor, $monitors) and $auto and return 1;
- my %h_monitors = map { ; "$_->{VendorName}|$_->{ModelName}" => $_ } @$monitors;
+ my %h_monitors = map {; "$_->{VendorName}|$_->{ModelName}" => $_ } @$monitors;
ask_monitor:
my $merged_name = do {
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm
index 6f8be8469..e228ffd98 100644
--- a/perl-install/bootlook.pm
+++ b/perl-install/bootlook.pm
@@ -47,7 +47,7 @@ my @usernames;
parse_etc_passwd();
my $x_mode = isXlaunched();
-my $a_mode = (-e "/etc/aurora/Monitor") ? 1 : 0;
+my $a_mode = -e "/etc/aurora/Monitor" ? 1 : 0;
my $l_mode = isAutologin();
my %auto_mode = get_autologin("");
my $inmain = 0;
@@ -451,7 +451,7 @@ sub isAutologin {
close AUTOLOGIN;
$line =~ s/AUTOLOGIN=(yes|no)/$1/;
chomp($line);
- $line = ($line eq "yes");
+ $line = $line eq "yes";
my %au = get_autologin('');
return $line && defined $au{autologin};
}
diff --git a/perl-install/harddrake/sound.pm b/perl-install/harddrake/sound.pm
index 1d7d4c2d8..8a20842dd 100644
--- a/perl-install/harddrake/sound.pm
+++ b/perl-install/harddrake/sound.pm
@@ -123,7 +123,7 @@ my %oss2alsa =
"ymfpci" => [ "snd-ymfpci" ]
);
-my @blacklist = (qw(cs46xx cs4281));
+my @blacklist = qw(cs46xx cs4281);
my $blacklisted = 0;
sub rooted { run_program::rooted($::prefix, @_) }
diff --git a/perl-install/harddrake/ui.pm b/perl-install/harddrake/ui.pm
index 741d9d19e..6957116ef 100644
--- a/perl-install/harddrake/ui.pm
+++ b/perl-install/harddrake/ui.pm
@@ -163,7 +163,7 @@ sub new {
# Build the gui
add_icon_path('/usr/share/pixmaps/harddrake2/');
- $w = my_gtk->new((N("Harddrake2 version ") . $harddrake::data::version));
+ $w = my_gtk->new(N("Harddrake2 version ") . $harddrake::data::version);
$w->{window}->set_usize(760, 550) unless $::isEmbedded;
$options{MODEMS_DETECTION} = 1 unless defined $options{MODEMS_DETECTION};
$options{PRINTERS_DETECTION} = 1 unless defined $options{PRINTERS_DETECTION};
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm
index a8f51e2e3..206d81dea 100644
--- a/perl-install/network/adsl.pm
+++ b/perl-install/network/adsl.pm
@@ -20,16 +20,14 @@ sub configure {
# N("The most common way to connect with adsl is pppoe.
# Some connections use pptp, a few ones use dhcp.
# If you don't know, choose 'use pppoe'"), [N_("use pppoe"), N_("use pptp"), N_("use dhcp"), N_("Alcatel speedtouch usb"), N_("ECI Hi-Focus")]) or return;
- my @l = (
- [N_("use pppoe"),
+ my $l = [N_("use pppoe"),
N_("use pptp"),
N_("use dhcp"),
- N_("Alcatel speedtouch usb") . if_($netc->{autodetect}{adsl}{speedtouch}, " - detected")]
- );
+ N_("Alcatel speedtouch usb") . if_($netc->{autodetect}{adsl}{speedtouch}, " - detected")];
my $type = $in->ask_from_list_(N("Connect to the Internet"),
N("The most common way to connect with adsl is pppoe.
Some connections use pptp, a few ones use dhcp.
-If you don't know, choose 'use pppoe'"), @l) or return;
+If you don't know, choose 'use pppoe'"), $l) or return;
$type =~ s/use //;
if ($type eq 'pppoe') {
$in->do_pkgs->install("rp-$type");
diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm
index e6997351e..a0f766333 100644
--- a/perl-install/network/isdn.pm
+++ b/perl-install/network/isdn.pm
@@ -257,7 +257,7 @@ sub isdn_detect {
sub isdn_detect_backend {
my ($isdn) = @_;
- if (my ($c) = (modules::probe_category('network/isdn'))) {
+ if (my ($c) = modules::probe_category('network/isdn')) {
$isdn->{$_} = $c->{$_} foreach qw(description vendor id driver options firmware);
$isdn->{$_} = sprintf("%0x", $isdn->{$_}) foreach 'vendor', 'id';
$isdn->{card_type} = 'pci';
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 007dfbe30..07ee52d96 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -228,7 +228,7 @@ If you don't want to use the auto detection, deselect the checkbox.
if ($nb < 1) {
} elsif ($nb > 1) {
$in->ask_from(N("Network Configuration Wizard"),
- N("You have configured multiple ways to connect to the Internet.\nChoose the one you want to use.\n\n" . if_(!$::isStandalone, "You may want to configure some profiles after the installation, in the Mandrake Control Center")),
+ N("You have configured multiple ways to connect to the Internet.\nChoose the one you want to use.\n\n") . if_(!$::isStandalone, "You may want to configure some profiles after the installation, in the Mandrake Control Center"),
[ { label => N("Internet connection"), val => \$netc->{internet_cnx_choice}, list => [ keys %{$netc->{internet_cnx}} ] } ]
) or goto step_2;
} elsif ($nb == 1) {
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index a5e9b119b..111139316 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -676,7 +676,7 @@ sub computeGroupSize {
#- installed and upgrade flags must have been computed (see compute_installed_flags).
my %newSelection;
unless ($p->flag_available) {
- my @l2 = ($p->id);
+ my @l2 = $p->id;
my $id;
while (defined($id = shift @l2)) {
@@ -864,7 +864,7 @@ sub installTransactionClosure {
}
while (defined($id = shift @l)) {
- my @l2 = ($id);
+ my @l2 = $id;
while (defined($id = shift @l2)) {
exists $closure{$id} and next;
diff --git a/perl-install/printer/detect.pm b/perl-install/printer/detect.pm
index 6aa03db11..57d151746 100644
--- a/perl-install/printer/detect.pm
+++ b/perl-install/printer/detect.pm
@@ -125,7 +125,7 @@ sub getIPsInLocalNetworks {
# ... for a local network (eth = ethernet,
# vmnet = VMWare,
# ethernet card connected to ISP excluded)?
- $dev_is_localnet = ($dev =~ /^eth/ || $dev =~ /^vmnet/);
+ $dev_is_localnet = $dev =~ /^eth/ || $dev =~ /^vmnet/;
# delete previous address
$current_bcast = "";
}
diff --git a/perl-install/printer/gimp.pm b/perl-install/printer/gimp.pm
index c292e583c..c6d7a08d0 100644
--- a/perl-install/printer/gimp.pm
+++ b/perl-install/printer/gimp.pm
@@ -80,7 +80,7 @@ sub addcupsremoteto {
my @printerlist = printer::cups::get_remote_queues();
my $ppdfile = "";
if ($printer->{SPOOLER} eq "cups" &&
- ((-x "$::prefix/usr/bin/curl") || (-x "$::prefix/usr/bin/wget"))) {
+ (-x "$::prefix/usr/bin/curl" || -x "$::prefix/usr/bin/wget")) {
foreach my $listentry (@printerlist) {
next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
my $q = $1;
@@ -100,7 +100,7 @@ sub addcupsremoteto {
"http://$server:631/printers/$q.ppd"));
}
# Does the file exist and is it not an error message?
- if ((-r "$::prefix/etc/foomatic/$queue.ppd") &&
+ if (-r "$::prefix/etc/foomatic/$queue.ppd" &&
cat_("$::prefix/etc/foomatic/$queue.ppd") =~ /^\*PPD-Adobe/) {
$ppdfile = "/etc/foomatic/$queue.ppd";
} else {
@@ -227,7 +227,7 @@ sub findconfigfiles {
foreach my $file (@configfilenames) {
my $dir = "$homedir/$file";
$dir =~ s,/[^/]*$,,;
- next if (-f $dir) && ! -d $dir;
+ next if -f $dir && ! -d $dir;
if (! -d "$::prefix$dir") {
mkdir_p("$::prefix$dir") or next;
set_permissions("$::prefix$dir", "$uid.$gid") or next;
@@ -362,11 +362,11 @@ sub isprinterconfigured {
if (/^\s*Printer\s*:\s*.*\s*$/) { # Next section
$done = 1;
} elsif (/^\s*Driver:\s*(\S+)\s*$/) {
- $drivernotps2 = ($1 ne "ps2");
+ $drivernotps2 = $1 ne "ps2";
} elsif (/^\s*PPD\-File:\s*(\S+)\s*$/) {
$ppdfileset = 1;
} elsif (/^\s*Destination:\s*(\S+.*)$/) {
- $nonrawprinting = ($1 !~ /\-o\s*raw/);
+ $nonrawprinting = $1 !~ /\-o\s*raw/;
}
}
}
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm
index f9e712aa9..c00bf1135 100644
--- a/perl-install/printer/main.pm
+++ b/perl-install/printer/main.pm
@@ -50,7 +50,7 @@ sub spooler {
# LPRng is not officially supported any more since Mandrake 9.0, so
# show it only in the spooler menu when it was manually installed.
my @res;
- if (files_exist((qw(/usr/lib/filters/lpf /usr/sbin/lpd)))) {
+ if (files_exist(qw(/usr/lib/filters/lpf /usr/sbin/lpd))) {
foreach (qw(cups lprng pdq)) { push @res, $spooler_inv{$_}{long_name} };
# {qw(cups lprng pdq)}{long_name};
} else {
@@ -982,7 +982,7 @@ sub configure_queue($) {
$useUSB ||= $_->{queuedata}{connect} =~ /usb/ ||
$_->{DeviceURI} =~ /usb/;
}
- $useUSB ||= ($printer->{currentqueue}{queue}{queuedata}{connect} =~ /usb/);
+ $useUSB ||= $printer->{currentqueue}{queue}{queuedata}{connect} =~ /usb/;
if ($useUSB) {
my $f = "$::prefix/etc/sysconfig/usb";
my %usb = getVarsFromSh($f);
diff --git a/perl-install/printer/office.pm b/perl-install/printer/office.pm
index a933fca29..2498bcabe 100644
--- a/perl-install/printer/office.pm
+++ b/perl-install/printer/office.pm
@@ -48,7 +48,7 @@ sub configureoffice {
my $configfilecontent = readsofficeconfigfile($configfilename);
# Update remote CUPS queues
if (0 && $printer->{SPOOLER} eq "cups" &&
- ((-x "$::prefix/usr/bin/curl") || (-x "$::prefix/usr/bin/wget"))) {
+ (-x "$::prefix/usr/bin/curl" || -x "$::prefix/usr/bin/wget")) {
my @printerlist = printer::cups::get_remote_queues();
foreach my $listentry (@printerlist) {
next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
@@ -114,7 +114,7 @@ sub add_cups_remote_to_office {
my $configfilecontent = readsofficeconfigfile($configfilename);
# Update remote CUPS queues
if ($printer->{SPOOLER} eq "cups" &&
- ((-x "$::prefix/usr/bin/curl") || (-x "$::prefix/usr/bin/wget"))) {
+ (-x "$::prefix/usr/bin/curl" || -x "$::prefix/usr/bin/wget")) {
my @printerlist = printer::cups::get_remote_queues();
foreach my $listentry (@printerlist) {
next if !($listentry =~ /^([^\|]+)\|([^\|]+)$/);
@@ -135,7 +135,7 @@ sub add_cups_remote_to_office {
"http://$server:631/printers/$q.ppd"));
}
# Does the file exist and is it not an error message?
- if ((-r "$::prefix/etc/foomatic/$queue.ppd") &&
+ if (-r "$::prefix/etc/foomatic/$queue.ppd" &&
cat_("$::prefix/etc/foomatic/$queue.ppd") =~ /^\*PPD-Adobe/) {
$configfilecontent =
$suites{$suite}{make}($printer, $queue,
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 9dd38d532..43fa9d5b5 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -174,7 +174,7 @@ sub first_time_dialog {
my $entry = $printer->{val}{DESCRIPTION};
if ($entry) { push (@printerlist, " - $entry\n") }
}
- my $morethanoneprinters = ($#printerlist > 0);
+ my $morethanoneprinters = $#printerlist > 0;
my $unknown_printers = $#autodetected - $#printerlist;
if (@printerlist != ()) {
unshift (@printerlist,
@@ -210,8 +210,8 @@ sub first_time_dialog {
# If networking is configured, start it, but don't ask the user to
# configure networking.
my $havelocalnetworks =
- (check_network($printer, $in, $upNetwork, 1) &&
- printer::detect::getIPsInLocalNetworks() != ());
+ check_network($printer, $in, $upNetwork, 1) &&
+ printer::detect::getIPsInLocalNetworks() != ();
# Finish building the dialog text
my $question = ($havelocalnetworks ?
@@ -245,8 +245,8 @@ sub wizard_welcome {
undef $printer->{AUTODETECTNETWORK};
undef $printer->{AUTODETECTSMB};
} else {
- $havelocalnetworks = (check_network($printer, $in, $upNetwork, 1) &&
- printer::detect::getIPsInLocalNetworks() != ());
+ $havelocalnetworks = check_network($printer, $in, $upNetwork, 1) &&
+ printer::detect::getIPsInLocalNetworks() != ();
if (!$havelocalnetworks) {
undef $printer->{AUTODETECTNETWORK};
undef $printer->{AUTODETECTSMB};
@@ -344,7 +344,7 @@ sub setup_local_autoscan {
my ($printer, $in, $upNetwork) = @_;
my (@port, @str, $device);
my $queue = $printer->{OLD_QUEUE};
- my $expert_or_modify = ($::expert || !$printer->{NEW});
+ my $expert_or_modify = $::expert || !$printer->{NEW};
my $do_auto_detect =
($expert_or_modify &&
$printer->{AUTODETECT} ||
@@ -373,12 +373,12 @@ sub setup_local_autoscan {
# configured, this command has no effect.
require services;
services::stop("hpoj");
- @autodetected = ($expert_or_modify || $printer->{AUTODETECTLOCAL}) and printer::detect::local_detect(),
+ @autodetected = $expert_or_modify || $printer->{AUTODETECTLOCAL} and printer::detect::local_detect(),
(!$expert_or_modify && $printer->{AUTODETECTNETWORK}) and printer::detect::net_detect(),
(!$expert_or_modify && $printer->{AUTODETECTSMB}) and printer::detect::net_smb_detect();
# We have more than one printer, so we must ask the user for a queue
# name in the fully automatic printer configuration.
- $printer->{MORETHANONE} = ($#autodetected > 0);
+ $printer->{MORETHANONE} = $#autodetected > 0;
foreach my $p (@autodetected) {
if ($p->{val}{DESCRIPTION}) {
my $menustr = $p->{val}{DESCRIPTION};
@@ -438,7 +438,7 @@ sub setup_local_autoscan {
} else {
# Always ask for queue name in recommended mode when no auto-
# detection was done
- $printer->{MORETHANONE} = ($#autodetected > 0);
+ $printer->{MORETHANONE} = $#autodetected > 0;
my $m;
for ($m = 0; $m <= 2; $m++) {
my $menustr = N("Printer on parallel port \#%s", $m);
@@ -454,8 +454,8 @@ sub setup_local_autoscan {
my $first = $menuentries->{$a};
my $second = $menuentries->{$b};
for (my $i = 0; $i <= $#prefixes; $i++) {
- my $firstinlist = ($first =~ m!^$prefixes[$i]!);
- my $secondinlist = ($second =~ m!^$::prefixes[$i]!);
+ my $firstinlist = $first =~ m!^$prefixes[$i]!;
+ my $secondinlist = $second =~ m!^$::prefixes[$i]!;
if ($firstinlist && !$secondinlist) { return -1 };
if ($secondinlist && !$firstinlist) { return 1 };
}
@@ -1599,7 +1599,7 @@ For your printer Printerdrake has found:
($printer->{MANUALMODEL} ? N("Select model manually") :
N("The model is correct")));
return 0 if !$res;
- $printer->{MANUALMODEL} = ($res eq N("Select model manually"));
+ $printer->{MANUALMODEL} = $res eq N("Select model manually");
1;
}
@@ -2264,7 +2264,7 @@ N("This command you can also use in the \"Printing command\" field of the printi
(!$raw ?
N("
The \"%s\" command also allows to modify the option settings for a particular printing job. Simply add the desired settings to the command line, e. g. \"%s <file>\". ", "lpr", ($queue ne $default ? "lpr -P $queue -Z option=setting -Z switch" : "lpr -Z option=setting -Z switch")) .
-N("To get a list of the options available for the current printer click on the \"Print option list\" button." . $scanning . $photocard) : $scanning . $photocard);
+N("To get a list of the options available for the current printer click on the \"Print option list\" button.") . $scanning . $photocard : $scanning . $photocard);
} elsif ($spooler eq "lpd") {
$dialogtext =
N("To print a file from the command line (terminal window) use the command \"%s <file>\".
@@ -2274,7 +2274,7 @@ N("This command you can also use in the \"Printing command\" field of the printi
(!$raw ?
N("
The \"%s\" command also allows to modify the option settings for a particular printing job. Simply add the desired settings to the command line, e. g. \"%s <file>\". ", "lpr", ($queue ne $default ? "lpr -P $queue -o option=setting -o switch" : "lpr -o option=setting -o switch")) .
-N("To get a list of the options available for the current printer click on the \"Print option list\" button." . $scanning . $photocard) : $scanning . $photocard);
+N("To get a list of the options available for the current printer click on the \"Print option list\" button.") . $scanning . $photocard : $scanning . $photocard);
} elsif ($spooler eq "pdq") {
$dialogtext =
N("To print a file from the command line (terminal window) use the command \"%s <file>\" or \"%s <file>\".
@@ -2685,11 +2685,11 @@ sub install_spooler {
# startup of printerdrake for several seconds.
printer::services::start_not_running_service("cups");
} elsif ($spoolers{$spooler}{service}) {
- printer::services::restart($spoolers{$spooler}{service}) ;
+ printer::services::restart($spoolers{$spooler}{service});
}
# Set the choosen spooler tools as defaults for "lpr", "lpq", "lprm", ...
- foreach (@{$spoolers{$spooler}{alternatives}}){
+ foreach (@{$spoolers{$spooler}{alternatives}}) {
set_alternative($_->[0], $_->[1]);
}
undef $w;
@@ -2892,9 +2892,9 @@ sub main {
# have a local network, to suppress some buttons in the
# recommended mode
my $havelocalnetworks_or_expert =
- ($::expert ||
+ $::expert ||
check_network($printer, $in, $upNetwork, 1) &&
- printer::detect::getIPsInLocalNetworks() != ());
+ printer::detect::getIPsInLocalNetworks() != ();
# Show a queue list window when there is at least one queue,
# when we are in expert mode, or when we are not in the
# installation.
@@ -2926,16 +2926,15 @@ sub main {
}
# Generate the list of available printers
my @printerlist =
- ((sort((map { $printer->{configured}{$_}{queuedata}{menuentry}
+ sort((map { $printer->{configured}{$_}{queuedata}{menuentry}
. ($_ eq $printer->{DEFAULT} ?
N(" (Default)") : "") }
keys(%{$printer->{configured}
|| {}})),
($printer->{SPOOLER} eq "cups" ?
printer::main::get_cups_remote_queues($printer) :
- ())))
- );
- my $noprinters = ($#printerlist < 0);
+ ()));
+ my $noprinters = $#printerlist < 0;
# Position the cursor where it were before (in case
# a button was pressed).
$menuchoice = $cursorpos;
diff --git a/perl-install/standalone.pm b/perl-install/standalone.pm
index baed48438..9f14e971f 100644
--- a/perl-install/standalone.pm
+++ b/perl-install/standalone.pm
@@ -103,7 +103,7 @@ Network & Internet connection and monitoring application
XFdrake resolution"),
);
-$usages{$_} = $usages{rpmdrake} foreach (qw(rpmdrake-remove MandrakeUpdate));
+$usages{$_} = $usages{rpmdrake} foreach qw(rpmdrake-remove MandrakeUpdate);
$usages{Xdrakres} = $usages{XFdrake};