summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-08-19 10:45:36 +0000
committerOlivier Blin <oblin@mandriva.org>2004-08-19 10:45:36 +0000
commit5705531c76a81cab986561a6c1b36d42f4db6287 (patch)
tree134a491479f8956beaaa9e236667e5cdbca32793 /perl-install
parent7b0eca11a29d25c29c4c99041b9ae87df901319c (diff)
downloaddrakx-5705531c76a81cab986561a6c1b36d42f4db6287.tar
drakx-5705531c76a81cab986561a6c1b36d42f4db6287.tar.gz
drakx-5705531c76a81cab986561a6c1b36d42f4db6287.tar.bz2
drakx-5705531c76a81cab986561a6c1b36d42f4db6287.tar.xz
drakx-5705531c76a81cab986561a6c1b36d42f4db6287.zip
workaround not to call c::upgrade_utf8 on read-only variables
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/printer/main.pm33
1 files changed, 22 insertions, 11 deletions
diff --git a/perl-install/printer/main.pm b/perl-install/printer/main.pm
index fbe1ef102..47f589ca7 100644
--- a/perl-install/printer/main.pm
+++ b/perl-install/printer/main.pm
@@ -350,21 +350,27 @@ sub make_menuentry {
$connection = N(", multi-function device");
}
} elsif ($connect =~ m!^file:(.+)$!) {
- $connection = N(", printing to %s", $1);
+ my $file = $1;
+ $connection = N(", printing to %s", $file);
} elsif ($connect =~ m!^lpd://([^/]+)/([^/]+)/?$!) {
- $connection = N(" on LPD server \"%s\", printer \"%s\"", $1, $2);
+ my ($server, $printer) = ($1, $2);
+ $connection = N(" on LPD server \"%s\", printer \"%s\"", $server, $printer);
} elsif ($connect =~ m!^socket://([^/:]+):([^/:]+)/?$!) {
- $connection = N(", TCP/IP host \"%s\", port %s", $1, $2);
+ my ($host, $port) = ($1, $2);
+ $connection = N(", TCP/IP host \"%s\", port %s", $host, $port);
} elsif ($connect =~ m!^smb://([^/\@]+)/([^/\@]+)/?$! ||
$connect =~ m!^smb://.*/([^/\@]+)/([^/\@]+)/?$! ||
$connect =~ m!^smb://.*\@([^/\@]+)/([^/\@]+)/?$!) {
- $connection = N(" on SMB/Windows server \"%s\", share \"%s\"", $1, $2);
+ my ($server, $share) = ($1, $2);
+ $connection = N(" on SMB/Windows server \"%s\", share \"%s\"", $server, $share);
} elsif ($connect =~ m!^ncp://([^/\@]+)/([^/\@]+)/?$! ||
$connect =~ m!^ncp://.*/([^/\@]+)/([^/\@]+)/?$! ||
$connect =~ m!^ncp://.*\@([^/\@]+)/([^/\@]+)/?$!) {
- $connection = N(" on Novell server \"%s\", printer \"%s\"", $1, $2);
+ my ($server, $printer) = ($1, $2);
+ $connection = N(" on Novell server \"%s\", printer \"%s\"", $server, $printer);
} elsif ($connect =~ m!^postpipe:(.+)$!) {
- $connection = N(", using command %s", $1);
+ my $command = $1;
+ $connection = N(", using command %s", $command);
} else {
$connection = ($printer->{expert} ? ", URI: $connect" : "");
}
@@ -401,22 +407,27 @@ sub connectionstr {
$connection = N("Multi-function device");
}
} elsif ($connect =~ m!^file:(.+)$!) {
- $connection = N("Prints into %s", $1);
+ my $file = $1;
+ $connection = N("Prints into %s", $file);
} elsif ($connect =~ m!^lpd://([^/]+)/([^/]+)/?$!) {
- $connection = N("LPD server \"%s\", printer \"%s\"", $1, $2);
+ my ($server, $port) = ($1, $2);
+ $connection = N("LPD server \"%s\", printer \"%s\"", $server, $port);
} elsif ($connect =~ m!^socket://([^/:]+):([^/:]+)/?$!) {
my ($host, $port) = ($1, $2);
$connection = N("TCP/IP host \"%s\", port %s", $host, $port);
} elsif ($connect =~ m!^smb://([^/\@]+)/([^/\@]+)/?$! ||
$connect =~ m!^smb://.*/([^/\@]+)/([^/\@]+)/?$! ||
$connect =~ m!^smb://.*\@([^/\@]+)/([^/\@]+)/?$!) {
- $connection = N("SMB/Windows server \"%s\", share \"%s\"", $1, $2);
+ my ($server, $share) = ($1, $2);
+ $connection = N("SMB/Windows server \"%s\", share \"%s\"", $server, $share);
} elsif ($connect =~ m!^ncp://([^/\@]+)/([^/\@]+)/?$! ||
$connect =~ m!^ncp://.*/([^/\@]+)/([^/\@]+)/?$! ||
$connect =~ m!^ncp://.*\@([^/\@]+)/([^/\@]+)/?$!) {
- $connection = N("Novell server \"%s\", printer \"%s\"", $1, $2);
+ my ($server, $share) = ($1, $2);
+ $connection = N("Novell server \"%s\", printer \"%s\"", $server, $share);
} elsif ($connect =~ m!^postpipe:(.+)$!) {
- $connection = N("Uses command %s", $1);
+ my $command = $1;
+ $connection = N("Uses command %s", $command);
} else {
$connection = N("URI: %s", $connect);
}