summaryrefslogtreecommitdiffstats
path: root/perl-install/printer/printerdrake.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-19 10:50:49 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-19 10:50:49 +0000
commit77f9d9023243eb841e77fe8804d3101eebabcd4f (patch)
treebebbc96c57bed0fb1639115bc5a533235ae2a2a1 /perl-install/printer/printerdrake.pm
parent5705531c76a81cab986561a6c1b36d42f4db6287 (diff)
downloaddrakx-77f9d9023243eb841e77fe8804d3101eebabcd4f.tar
drakx-77f9d9023243eb841e77fe8804d3101eebabcd4f.tar.gz
drakx-77f9d9023243eb841e77fe8804d3101eebabcd4f.tar.bz2
drakx-77f9d9023243eb841e77fe8804d3101eebabcd4f.tar.xz
drakx-77f9d9023243eb841e77fe8804d3101eebabcd4f.zip
workaround not to call c::upgrade_utf8 on read-only variables
Diffstat (limited to 'perl-install/printer/printerdrake.pm')
-rw-r--r--perl-install/printer/printerdrake.pm30
1 files changed, 20 insertions, 10 deletions
diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm
index 83583b7d0..4492bf9c1 100644
--- a/perl-install/printer/printerdrake.pm
+++ b/perl-install/printer/printerdrake.pm
@@ -949,13 +949,17 @@ sub setup_local_autoscan {
if ($p->{val}{DESCRIPTION}) {
my $menustr = $p->{val}{DESCRIPTION};
if ($p->{port} =~ m!^/dev/lp(\d+)$!) {
- $menustr .= N(" on parallel port #%s", $1);
+ my $port = $1
+ $menustr .= N(" on parallel port #%s", $port);
} elsif ($p->{port} =~ m!^/dev/usb/lp(\d+)$!) {
- $menustr .= N(", USB printer #%s", $1);
+ my $printer = $1;
+ $menustr .= N(", USB printer #%s", $printer);
} elsif ($p->{port} =~ m!^socket://([^:]+):(\d+)$!) {
- $menustr .= N(", network printer \"%s\", port %s", $1, $2);
+ my ($printer, $port) = ($1, $2);
+ $menustr .= N(", network printer \"%s\", port %s", $printer, $port);
} elsif ($p->{port} =~ m!^smb://([^/:]+)/([^/:]+)$!) {
- $menustr .= N(", printer \"%s\" on SMB/Windows server \"%s\"", $2, $1);
+ my ($server, $printer) = ($1, $2);
+ $menustr .= N(", printer \"%s\" on SMB/Windows server \"%s\"", $printer, $server);
}
$menustr .= " ($p->{port})" if $printer->{expert};
$menuentries->{$menustr} = $p->{port};
@@ -963,13 +967,17 @@ sub setup_local_autoscan {
} else {
my $menustr;
if ($p->{port} =~ m!^/dev/lp(\d+)$!) {
- $menustr = N("Printer on parallel port #%s", $1);
+ my $port = $1;
+ $menustr = N("Printer on parallel port #%s", $port);
} elsif ($p->{port} =~ m!^/dev/usb/lp(\d+)$!) {
- $menustr = N("USB printer #%s", $1);
+ my $printer = $1;
+ $menustr = N("USB printer #%s", $printer);
} elsif ($p->{port} =~ m!^socket://([^:]+):(\d+)$!) {
- $menustr .= N("Network printer \"%s\", port %s", $1, $2);
+ my ($printer, $port);
+ $menustr .= N("Network printer \"%s\", port %s", $printer, $port);
} elsif ($p->{port} =~ m!^smb://([^/:]+)/([^/:]+)$!) {
- $menustr .= N("Printer \"%s\" on SMB/Windows server \"%s\"", $2, $1);
+ my ($server, $printer) = ($1, $2);
+ $menustr .= N("Printer \"%s\" on SMB/Windows server \"%s\"", $printer, $server);
}
$menustr .= " ($p->{port})" if $printer->{expert};
$menuentries->{$menustr} = $p->{port};
@@ -986,9 +994,11 @@ sub setup_local_autoscan {
}
my $menustr;
if ($q =~ m!^/dev/lp(\d+)$!) {
- $menustr = N("Printer on parallel port #%s", $1);
+ my $port = $1;
+ $menustr = N("Printer on parallel port #%s", $port);
} elsif ($q =~ m!^/dev/usb/lp(\d+)$!) {
- $menustr = N("USB printer #%s", $1);
+ my $printer;
+ $menustr = N("USB printer #%s", $printer);
}
$menustr .= " ($q)" if $printer->{expert};
$menuentries->{$menustr} = $q;