summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/scanner.pm14
-rwxr-xr-xperl-install/standalone/drakbug12
-rwxr-xr-xperl-install/standalone/drakperm14
3 files changed, 20 insertions, 20 deletions
diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm
index 8234ee218..e1267c600 100755
--- a/perl-install/scanner.pm
+++ b/perl-install/scanner.pm
@@ -47,9 +47,11 @@ sub confScanner {
next if $line =~ /\$VENDOR/;
$line =~ s/\$PRODUCT/$product/g if $product;
next if $line =~ /\$PRODUCT/;
- $line =~ /^(\S*)LINE\s+(.*?)$/;
- my $linetype = $1;
- $line = $2;
+ my $linetype;
+ if ($line =~ /^(\S*)LINE\s+(.*?)$/) {
+ $linetype = $1;
+ $line = $2;
+ }
next if !$line;
if (!$linetype ||
($linetype eq "USB" && ($port =~ /usb/i || $vendor)) ||
@@ -151,8 +153,7 @@ sub detect {
# SANE
next if $description =~ /Alcatel.*Speed.*Touch|Camera|ISDN|ADSL/i;
# Extract port
- $line =~ /\s+(\S+)\s*$/;
- $port = $1;
+ $port = $1 if $line =~ /\s+(\S+)\s*$/;
# Check for duplicate (scanner.o/libusb)
if ($port =~ /^libusb/) {
my $duplicate = 0;
@@ -387,8 +388,7 @@ sub updateScannerDBfromSane {
# this backend and add what is needed for the
# interfaces of this scanner
foreach my $line (@{$configlines{$backend}}) {
- $line =~ /^\s*(\S*?)LINE/;
- my $i = $1;
+ my $i = $1 if $line =~ /^\s*(\S*?)LINE/;
if (!$i || $intf =~ /$i/i) {
$to_add .= "$line\n";
}
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index 1828f9d26..3b9427618 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -64,7 +64,7 @@ my $mdk_app = {
N("Configuration Wizards") => 'wizdrake',
};
-my @generic_tool = keys %{$mdk_app};
+my @generic_tool = keys %$mdk_app;
my @all_drakxtools = @{ $mdk_app->{N("Standalone Tools")} };
push(@generic_tool,@all_drakxtools);
@@ -137,10 +137,10 @@ sub update_app {
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
if (member($text,@all_drakxtools) || $text eq N("Standalone Tools")) {
$app_choice = chomp_(`rpm -q drakxtools`);
- } elsif (member($text, keys %{$mdk_app}) && $text ne N("Standalone Tools")) {
+ } elsif (member($text, keys %$mdk_app) && $text ne N("Standalone Tools")) {
$app_choice = get_package($mdk_app->{$text});
} else {
- LOOP: while (my ($key,$value) = each %{$mdk_app}) {
+ LOOP: while (my ($key, $value) = each %$mdk_app) {
next if $key eq N("Standalone Tools");
if ($value eq $text) {
$app_choice = get_package($text);
@@ -168,14 +168,14 @@ sub get_package {
$rpm_package;
}
-sub parse_release {
+sub parse_release() {
my ($rel) = mandrake_release() =~ /release\s(\S+\s\(.*\))/;
$rel;
}
sub connect_bugzilla {
my ($url) = @_;
- my $w = $in->wait_message('', N("connecting to Bugzilla wizard ..."));
+ my $_w = $in->wait_message('', N("connecting to Bugzilla wizard ..."));
sleep(3);
exec $ENV{BROWSER},$url if exists $ENV{BROWSER};
my @browser = qw(mozilla konqueror galeon);
@@ -185,6 +185,6 @@ sub connect_bugzilla {
$in->ask_warn('', N("No browser available! Please install one"));
}
-sub quit_global {
+sub quit_global() {
ugtk2->exit(0);
}
diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm
index 6cd2202a3..fdf237e80 100755
--- a/perl-install/standalone/drakperm
+++ b/perl-install/standalone/drakperm
@@ -48,12 +48,12 @@ my $combo_perm = new Gtk2::Combo;
$combo_perm->entry->set_editable(0);
$combo_perm->set_popdown_strings(sort(keys %perm));
-sub add_callback {
+sub add_callback() {
row_setting_dialog();
$modified++;
}
-sub edit_callback {
+sub edit_callback() {
my (undef, $iter) = $permList->get_selection->get_selected;
return unless $iter;
row_setting_dialog($iter);
@@ -61,7 +61,7 @@ sub edit_callback {
my @buttons;
-sub del_callback {
+sub del_callback() {
my ($tree, $iter) = $permList->get_selection->get_selected();
$tree->remove($iter);
$iter->free;
@@ -69,7 +69,7 @@ sub del_callback {
$modified++;
}
-sub down_callback {
+sub down_callback() {
my ($model, $iter) = $permList->get_selection->get_selected;
return unless $iter;
my $new_iter = $model->iter_next($iter);
@@ -83,7 +83,7 @@ sub down_callback {
CLEAN1: $iter->free;
}
-sub up_callback {
+sub up_callback() {
my ($model, $iter) = $permList->get_selection->get_selected;
return unless $iter;
my $path = $model->get_path($iter);
@@ -161,7 +161,7 @@ $w->main;
ugtk2->exit;
-sub check_save {
+sub check_save() {
$modified or return 0;
my $sav_ = $in->ask_okcancel('Warning', 'your changed will be lost do you wish to continue?');
$sav_
@@ -201,7 +201,7 @@ sub display_perm {
$prec_txt = $perm_level;
}
-sub save_perm {
+sub save_perm() {
$modified or return 0;
my $val;
local *F;