diff options
-rw-r--r-- | perl-install/network/adsl.pm | 1 | ||||
-rw-r--r-- | perl-install/printer.pm | 12 | ||||
-rw-r--r-- | perl-install/printerdrake.pm | 9 | ||||
-rw-r--r-- | perl-install/ugtk.pm | 2 |
4 files changed, 13 insertions, 11 deletions
diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index ee01ccb21..7516a70de 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -82,6 +82,7 @@ sub adsl_ask_info { sub adsl_detect { my ($adsl) = @_; + require detect_devices; $adsl->{speedtouch} = detect_devices::getSpeedtouch(); return $adsl if $adsl->{speedtouch}; } diff --git a/perl-install/printer.pm b/perl-install/printer.pm index 2e8fd6f1b..a769a1843 100644 --- a/perl-install/printer.pm +++ b/perl-install/printer.pm @@ -45,9 +45,9 @@ our %spoolers = ('ppq' => { 'short_name' => _("CUPS") } ); -our %spooler_inv = map {$spooler{$_}{long_name} => $_ } keys %spoolers; +our %spooler_inv = map { $spooler{$_}{long_name} => $_ } keys %spoolers; -our %shortspooler_inv = map {$spooler{$_}{short_name} => $_ } keys %spoolers; +our %shortspooler_inv = map { $spooler{$_}{short_name} => $_ } keys %spoolers; %printer_type = ( _("Local printer") => "LOCAL", @@ -60,7 +60,7 @@ our %shortspooler_inv = map {$spooler{$_}{short_name} => $_ } keys %spoolers; _("Enter a printer device URI") => "URI", _("Pipe job into a command") => "POSTPIPE" ); -%printer_type_inv = reverse %printer_type; +our %printer_type_inv = reverse %printer_type; #------------------------------------------------------------------------------ @@ -1116,7 +1116,7 @@ sub set_cups_special_options { # If nothing is already configured, set text file borders of half an inch # and decrease the font size a little bit, so nothing of the text gets # cut off by unprintable borders. - if(!grep {/$queue.*\s(page-(top|bottom|left|right)|lpi|cpi)=/} @lpoptions){ + if (!grep { /$queue.*\s(page-(top|bottom|left|right)|lpi|cpi)=/ } @lpoptions){ run_program::rooted($prefix, "lpoptions", "-p", $queue, "-o", "page-top=36", "-o", "page-bottom=36", @@ -1124,7 +1124,7 @@ sub set_cups_special_options { "-o", "cpi=12", "-o", "lpi=7", "-o", "wrap"); } # Let images fill the whole page by default - if (!grep {/$queue.*\s(scaling|natural-scaling|ppi)=/} @lpoptions) { + if (!grep { /$queue.*\s(scaling|natural-scaling|ppi)=/ } @lpoptions) { run_program::rooted($prefix, "lpoptions", "-p", $queue, "-o", "scaling=100"); @@ -3180,7 +3180,7 @@ sub findgimpconfigfiles { open PASSWD, "< $prefix/etc/passwd" or die "Cannot read /etc/passwd!\n"; while (<PASSWD>) { chomp; - if ($_ =~ /^([^:]+):[^:]*:([^:]+):([^:]+):[^:]*:([^:]+):[^:]*$/) { + if (/^([^:]+):[^:]*:([^:]+):([^:]+):[^:]*:([^:]+):[^:]*$/) { my ($username, $uid, $gid, $homedir) = ($1, $2, $3, $4); if ((($uid == 0) || ($uid >= 500)) && ($username ne "nobody")) { for my $file (@configfilenames) { diff --git a/perl-install/printerdrake.pm b/perl-install/printerdrake.pm index 312ccff2d..ab462b977 100644 --- a/perl-install/printerdrake.pm +++ b/perl-install/printerdrake.pm @@ -194,7 +194,7 @@ sub first_time_dialog { $localprinterspresent = 1; for my $printer (@autodetected) { my $entry = $printer->{val}{DESCRIPTION}; - if ($entry) {push (@printerlist, " - $entry\n");} + if ($entry) { push (@printerlist, " - $entry\n") } } my $morethanoneprinters = ($#printerlist > 0); my $unknown_printers = $#autodetected - $#printerlist; @@ -502,8 +502,8 @@ sub setup_local_autoscan { for (my $i = 0; $i <= $#prefixes; $i++) { my $firstinlist = ($first =~ m!^$prefixes[$i]!); my $secondinlist = ($second =~ m!^$prefixes[$i]!); - if (($firstinlist) && (!$secondinlist)) {return -1}; - if (($secondinlist) && (!$firstinlist)) {return 1}; + if (($firstinlist) && (!$secondinlist)) { return -1 }; + if (($secondinlist) && (!$firstinlist)) { return 1 }; } return $first cmp $second; } keys(%{$menuentries}); @@ -1150,7 +1150,7 @@ sub setup_socket { } # Auto-detect printer model - my $modelinfo = undef; + my $modelinfo; if ($printer->{AUTODETECT}) { $modelinfo = printer::getSNMPModel ($remotehost); } @@ -2665,6 +2665,7 @@ sub security_check { if ($::isInstall) { $security = $in->{security}; } else { + require any; $security = any::get_secure_level(); } diff --git a/perl-install/ugtk.pm b/perl-install/ugtk.pm index dd1095a05..9e8af572a 100644 --- a/perl-install/ugtk.pm +++ b/perl-install/ugtk.pm @@ -363,7 +363,7 @@ sub createScrolledWindow { my $w = new Gtk::ScrolledWindow(undef, undef); $policy ||= [ 'automatic', 'automatic']; $w->set_policy(@{$policy}); - if(member(ref $W, qw(Gtk::CList Gtk::CTree Gtk::Text))) { + if (member(ref $W, qw(Gtk::CList Gtk::CTree Gtk::Text))) { $w->add($W) } else { $w->add_with_viewport($W); |