summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2002-07-31 22:40:00 +0000
committerPascal Rigaux <pixel@mandriva.com>2002-07-31 22:40:00 +0000
commit5a08b6763c4a2efd6da24fc7a3d0149618e086ea (patch)
treedadf7b0060bdf672762e458f936b4e20b7949bfa
parent2c2ac91cdc7f1bd86dfd222fc8edeb4edea46a5d (diff)
downloaddrakx-5a08b6763c4a2efd6da24fc7a3d0149618e086ea.tar
drakx-5a08b6763c4a2efd6da24fc7a3d0149618e086ea.tar.gz
drakx-5a08b6763c4a2efd6da24fc7a3d0149618e086ea.tar.bz2
drakx-5a08b6763c4a2efd6da24fc7a3d0149618e086ea.tar.xz
drakx-5a08b6763c4a2efd6da24fc7a3d0149618e086ea.zip
make perl_checker happy again (replacing "{xx}->{yy}" by "{xx}{yy}")
-rw-r--r--perl-install/Xconfig/various.pm1
-rw-r--r--perl-install/Xconfig/xfreeX.pm2
-rw-r--r--perl-install/bootlook.pm2
-rw-r--r--perl-install/detect_devices.pm10
-rw-r--r--perl-install/diskdrake/interactive.pm2
-rw-r--r--perl-install/install_any.pm12
-rw-r--r--perl-install/network/ethernet.pm6
-rw-r--r--perl-install/network/netconnect.pm18
-rw-r--r--perl-install/network/network.pm2
-rw-r--r--perl-install/printer.pm42
-rw-r--r--perl-install/resize_fat/info_sector.pm2
-rw-r--r--perl-install/resize_fat/main.pm4
12 files changed, 52 insertions, 51 deletions
diff --git a/perl-install/Xconfig/various.pm b/perl-install/Xconfig/various.pm
index 0089acd30..e24416e01 100644
--- a/perl-install/Xconfig/various.pm
+++ b/perl-install/Xconfig/various.pm
@@ -4,6 +4,7 @@ use diagnostics;
use strict;
use Xconfig::card;
+use Xconfig::default;
use Xconfig::resolution_and_depth;
use common;
use any;
diff --git a/perl-install/Xconfig/xfreeX.pm b/perl-install/Xconfig/xfreeX.pm
index f6aa17f78..1112c2234 100644
--- a/perl-install/Xconfig/xfreeX.pm
+++ b/perl-install/Xconfig/xfreeX.pm
@@ -87,7 +87,7 @@ sub get_devices {
map {
my $raw_device = $_;
my $device = raw_export_section($raw_device, [ 'Identifier', $raw_X->get_device_section_fields ]);
- $device->{Options} = raw_export_section($raw_device, [ grep { (deref_array($raw_device->{$_}))[0]->{Option} } keys %$raw_device ]);
+ $device->{Options} = raw_export_section($raw_device, [ grep { (deref_array($raw_device->{$_}))[0]{Option} } keys %$raw_device ]);
$device;
} @raw_devices;
}
diff --git a/perl-install/bootlook.pm b/perl-install/bootlook.pm
index b94250e39..213736059 100644
--- a/perl-install/bootlook.pm
+++ b/perl-install/bootlook.pm
@@ -98,7 +98,7 @@ my $x_box = new Gtk::VBox(0, 0);
my $disp_mode = arch() =~ /ppc/ ? _("Yaboot mode") : _("Lilo/grub mode");
gtkadd($window,
gtkpack__ (my $global_vbox = new Gtk::VBox(0,0),
- gtkadd (new Gtk::Frame ("$disp_mode"),
+ gtkadd (new Gtk::Frame ($disp_mode),
# gtkpack__(new Gtk::VBox(0,0),
(gtkpack_(gtkset_border_width(new Gtk::HBox(0, 0),5),
1,_("You are currently using %s as your boot manager.
diff --git a/perl-install/detect_devices.pm b/perl-install/detect_devices.pm
index 5937c7c83..4514d5f5e 100644
--- a/perl-install/detect_devices.pm
+++ b/perl-install/detect_devices.pm
@@ -153,10 +153,10 @@ sub isDvdDrive {
my $f = tryOpen($e->{device});
$f && c::isDvdDrive(fileno($f));
}
-sub isZipDrive { $_[0]->{info} =~ /ZIP\s+\d+/ } #- accept ZIP 100, untested for bigger ZIP drive.
-sub isJazzDrive { $_[0]->{info} =~ /\bJAZZ?\b/i } #- accept "iomega jaz 1GB"
-sub isLS120Drive { $_[0]->{info} =~ /LS-?120|144MB/ }
-sub isRemovableDrive { &isZipDrive || &isLS120Drive || $_[0]->{media_type} eq 'fd' } #-or &isJazzDrive }
+sub isZipDrive { $_[0]{info} =~ /ZIP\s+\d+/ } #- accept ZIP 100, untested for bigger ZIP drive.
+sub isJazzDrive { $_[0]{info} =~ /\bJAZZ?\b/i } #- accept "iomega jaz 1GB"
+sub isLS120Drive { $_[0]{info} =~ /LS-?120|144MB/ }
+sub isRemovableDrive { &isZipDrive || &isLS120Drive || $_[0]{media_type} eq 'fd' } #-or &isJazzDrive }
sub isFloppyOrHD {
my ($dev) = @_;
@@ -656,7 +656,7 @@ sub getSNMPModel {
sub whatNetPrinter () {
my $i;
- my @res = ();
+ my @res;
# Scan network for printers (one of ports 9100-9199 open)
local *F;
diff --git a/perl-install/diskdrake/interactive.pm b/perl-install/diskdrake/interactive.pm
index fe5e897c4..fa3593d89 100644
--- a/perl-install/diskdrake/interactive.pm
+++ b/perl-install/diskdrake/interactive.pm
@@ -1161,7 +1161,7 @@ sub format_raw_hd_info {
#- get the minimal size of partition in sectors to help diskdrake on
#- limit cases, include a cylinder + start of a eventually following
#- logical partition.
-sub min_partition_size { $_[0]->cylinder_size() + 2*$_[0]->{geom}{sectors} }
+sub min_partition_size { $_[0]->cylinder_size() + 2*$_[0]{geom}{sectors} }
sub choose_encrypt_key {
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 8159ffe19..a69e8c0c6 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -1170,7 +1170,7 @@ sub what_provides {
sub is_installed {
my ($do, @l) = @_;
foreach (@l) {
- my $p = pkgs::packageByName($do->{o}->{packages}, $_);
+ my $p = pkgs::packageByName($do->{o}{packages}, $_);
$p && $p->flag_selected or return;
}
1;
@@ -1180,25 +1180,25 @@ sub remove {
my ($do, @l) = @_;
@l = grep {
- my $p = pkgs::packageByName($do->{o}->{packages}, $_);
- pkgs::unselectPackage($do->{o}->{packages}, $p) if $p;
+ my $p = pkgs::packageByName($do->{o}{packages}, $_);
+ pkgs::unselectPackage($do->{o}{packages}, $p) if $p;
$p;
} @l;
- run_program::rooted($do->{o}->{prefix}, 'rpm', '-e', @l);
+ run_program::rooted($do->{o}{prefix}, 'rpm', '-e', @l);
}
sub remove_nodeps {
my ($do, @l) = @_;
@l = grep {
- my $p = pkgs::packageByName($do->{o}->{packages}, $_);
+ my $p = pkgs::packageByName($do->{o}{packages}, $_);
if ($p) {
$p->set_flag_requested(0);
$p->set_flag_required(0);
}
$p;
} @l;
- run_program::rooted($do->{o}->{prefix}, 'rpm', '-e', '--nodeps', @l);
+ run_program::rooted($do->{o}{prefix}, 'rpm', '-e', '--nodeps', @l);
}
################################################################################
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index aa2339fe2..8a71f60c7 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -87,7 +87,7 @@ sub conf_network_card {
my $interface;
@all_cards == () and $in->ask_warn('', _("No ethernet network adapter has been detected on your system.
I cannot set up this connection type.")) and return;
- @all_cards == 1 and $interface = $all_cards[0]->[0] and goto l1;
+ @all_cards == 1 and $interface = $all_cards[0][0] and goto l1;
again :
$interface = $in->ask_from_list(_("Choose the network interface"),
_("Please choose which network adapter you want to use to connect to Internet"),
@@ -155,7 +155,7 @@ sub conf_network_card_backend {
@{$intf->{$device}}{qw(DEVICE BOOTPROTO NETMASK NETWORK ONBOOT)} =
($device, $type, '255.255.255.0', $netadr, 'yes');
- $intf->{$device}->{IPADDR} = $ipadr if $ipadr;
+ $intf->{$device}{IPADDR} = $ipadr if $ipadr;
$device;
}
@@ -185,7 +185,7 @@ sub configureNetwork {
my $intf2 = findIntf($intf ||= {}, $_);
add2hash($intf2, $last);
add2hash($intf2, { NETMASK => '255.255.255.0' });
- configureNetworkIntf($netc, $in, $intf2, $netc->{NET_DEVICE}, 0, $all_cards[$n_card]->[1]) or return;
+ configureNetworkIntf($netc, $in, $intf2, $netc->{NET_DEVICE}, 0, $all_cards[$n_card][1]) or return;
$last = $intf2;
$n_card++;
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 8aef0b3c8..3bfc02768 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -373,7 +373,7 @@ DNSThirdIP=$netc->{dnsServer3}
AdminInterface=
" . join ('', map {
-"Eth${_}Known=" . ($intf->{"eth$_"}->{DEVICE} eq "eth$_" ? 'true' : 'false') . "
+"Eth${_}Known=" . ($intf->{"eth$_"}{DEVICE} eq "eth$_" ? 'true' : 'false') . "
Eth${_}IP=" . $intf->{"eth$_"}{IPADDR} . "
Eth${_}Mask=" . $intf->{"eth$_"}{NETMASK} . "
Eth${_}Mac=
@@ -381,7 +381,7 @@ Eth${_}BootProto=" . $intf->{"eth$_"}{BOOTPROTO} . "
Eth${_}OnBoot=" . $intf->{"eth$_"}{ONBOOT} . "
Eth${_}Hostname=$netc->{HOSTNAME}
Eth${_}HostAlias=" . do { $netc->{HOSTNAME} =~ /([^\.]*)\./; $1 } . "
-Eth${_}Driver=$all_cards[$_]->[1]
+Eth${_}Driver=$all_cards[$_][1]
Eth${_}Irq=
Eth${_}Port=
Eth${_}DHCPClient=" . ($intf->{"eth$_"}{BOOTPROTO} eq 'dhcp' ? $netcnx->{dhcp_client} : '') . "
@@ -528,13 +528,13 @@ sub load_conf {
/^InternetGateway=(.*)$/ and $netc->{GATEWAY} = $1;
/^SystemName=(.*)$/ and $system_name = $1;
/^DomainName=(.*)$/ and $domain_name = $1;
- /^Eth([0-9])Known=true$/ and $intf->{"eth$1"}->{DEVICE} = "eth$1";
- /^Eth([0-9])IP=(.*)$/ && $intf->{"eth$1"}->{DEVICE} and $intf->{"eth$1"}{IPADDR} = $2;
- /^Eth([0-9])Mask=(.*)\n/ && $intf->{"eth$1"}->{DEVICE} and $intf->{"eth$1"}{NETMASK} = $2;
- /^Eth([0-9])BootProto=(.*)\n/ && $intf->{"eth$1"}->{DEVICE} and $intf->{"eth$1"}{BOOTPROTO} = $2;
- /^Eth([0-9])OnBoot=(.*)\n/ && $intf->{"eth$1"}->{DEVICE} and $intf->{"eth$1"}{ONBOOT} = $2;
- /^Eth([0-9])Hostname=(.*)\n/ && $intf->{"eth$1"}->{DEVICE} and $netc->{HOSTNAME} = $2;
- /^Eth([0-9])Driver=(.*)\n/ && $intf->{"eth$1"}->{DEVICE} and $intf->{"eth$1"}{driver} = $2;
+ /^Eth([0-9])Known=true$/ and $intf->{"eth$1"}{DEVICE} = "eth$1";
+ /^Eth([0-9])IP=(.*)$/ && $intf->{"eth$1"}{DEVICE} and $intf->{"eth$1"}{IPADDR} = $2;
+ /^Eth([0-9])Mask=(.*)\n/ && $intf->{"eth$1"}{DEVICE} and $intf->{"eth$1"}{NETMASK} = $2;
+ /^Eth([0-9])BootProto=(.*)\n/ && $intf->{"eth$1"}{DEVICE} and $intf->{"eth$1"}{BOOTPROTO} = $2;
+ /^Eth([0-9])OnBoot=(.*)\n/ && $intf->{"eth$1"}{DEVICE} and $intf->{"eth$1"}{ONBOOT} = $2;
+ /^Eth([0-9])Hostname=(.*)\n/ && $intf->{"eth$1"}{DEVICE} and $netc->{HOSTNAME} = $2;
+ /^Eth([0-9])Driver=(.*)\n/ && $intf->{"eth$1"}{DEVICE} and $intf->{"eth$1"}{driver} = $2;
/^ISDNDriver=(.*)$/ and $isdn->{driver} = $1;
/^ISDNDeviceType=(.*)$/ and $isdn->{type} = $1;
/^ISDNIrq=(.*)/ and $isdn->{irq} = $1;
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 880b23aa6..4305d6011 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -207,7 +207,7 @@ sub dnsServers {
sub findIntf {
my ($intf, $device) = @_;
- $intf->{$device}->{DEVICE} = $device;
+ $intf->{$device}{DEVICE} = $device;
$intf->{$device};
}
#PAD \s* a la fin
diff --git a/perl-install/printer.pm b/perl-install/printer.pm
index ce3d02d5e..f780963af 100644
--- a/perl-install/printer.pm
+++ b/perl-install/printer.pm
@@ -473,44 +473,44 @@ sub read_configured_queues($) {
my $i;
my $N = $#QUEUES + 1;
for ($i = 0; $i < $N; $i++) {
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}} =
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}} =
$QUEUES[$i];
- if ((!$QUEUES[$i]->{make}) || (!$QUEUES[$i]->{model})) {
+ if ((!$QUEUES[$i]{make}) || (!$QUEUES[$i]{model})) {
if ($printer->{SPOOLER} eq "cups") {
- $printer->{OLD_QUEUE} = $QUEUES[$i]->{queuedata}{queue};
+ $printer->{OLD_QUEUE} = $QUEUES[$i]{queuedata}{queue};
my $descr = get_descr_from_ppd($printer);
$descr =~ m/^([^\|]*)\|([^\|]*)\|.*$/;
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{make} ||= $1;
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{model} ||= $2;
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{make} ||= $1;
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{model} ||= $2;
# Read out which PPD file was originally used to set up this
# queue
local *F;
- if (open F, "< $prefix/etc/cups/ppd/$QUEUES[$i]->{queuedata}{queue}.ppd") {
+ if (open F, "< $prefix/etc/cups/ppd/$QUEUES[$i]{queuedata}{queue}.ppd") {
while (my $line = <F>) {
if ($line =~ /^\*%MDKMODELCHOICE:(.+)$/) {
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{ppd} = $1;
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{ppd} = $1;
}
}
close F;
}
# Mark that we have a CUPS queue but do not know the name
# the PPD file in /usr/share/cups/model
- if (!$printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{ppd}) {
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{ppd} = '1';
+ if (!$printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{ppd}) {
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{ppd} = '1';
}
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{driver} = 'CUPS/PPD';
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{driver} = 'CUPS/PPD';
$printer->{OLD_QUEUE} = "";
# Read out the printer's options
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{args} = read_cups_options($QUEUES[$i]->{queuedata}{queue});
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{args} = read_cups_options($QUEUES[$i]{queuedata}{queue});
}
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{make} ||= "";
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{model} ||= _("Unknown model");
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{make} ||= "";
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{model} ||= _("Unknown model");
} else {
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{make} = $QUEUES[$i]->{make};
- $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{model} = $QUEUES[$i]->{model};
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{make} = $QUEUES[$i]{make};
+ $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{model} = $QUEUES[$i]{model};
}
# Fill in "options" field
- if (my $args = $printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{args}) {
+ if (my $args = $printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{args}) {
my $arg;
my @options;
for $arg (@{$args}) {
@@ -518,11 +518,11 @@ sub read_configured_queues($) {
my $optstr = $arg->{name} . "=" . $arg->{default};
push(@options, $optstr);
}
- @{$printer->{configured}{$QUEUES[$i]->{queuedata}{queue}}{queuedata}{options}} = @options;
+ @{$printer->{configured}{$QUEUES[$i]{queuedata}{queue}}{queuedata}{options}} = @options;
}
# Construct an entry line for tree view in main window of
# printerdrake
- make_menuentry($printer, $QUEUES[$i]->{queuedata}{queue});
+ make_menuentry($printer, $QUEUES[$i]{queuedata}{queue});
}
}
@@ -647,7 +647,7 @@ sub read_printer_db(;$) {
$entry->{ENTRY} = "$entry->{make}|$entry->{model}|$driverstr";
$entry->{driver} = $driver;
# Duplicate contents of $entry because it is multiply entered to the database
- map { $thedb{$entry->{ENTRY}}->{$_} = $entry->{$_} } keys %$entry;
+ map { $thedb{$entry->{ENTRY}}{$_} = $entry->{$_} } keys %$entry;
}
} else {
# Recommended mode
@@ -656,7 +656,7 @@ sub read_printer_db(;$) {
$entry->{ENTRY} = "$entry->{make}|$entry->{model}";
if ($entry->{defaultdriver}) {
$entry->{driver} = $entry->{defaultdriver};
- map { $thedb{$entry->{ENTRY}}->{$_} = $entry->{$_} } keys %$entry;
+ map { $thedb{$entry->{ENTRY}}{$_} = $entry->{$_} } keys %$entry;
}
}
$entry = {};
@@ -696,7 +696,7 @@ sub read_printer_db(;$) {
$entry->{driver} = "raw";
$entry->{make} = "";
$entry->{model} = _("Unknown model");
- map { $thedb{$entry->{ENTRY}}->{$_} = $entry->{$_} } keys %$entry;
+ map { $thedb{$entry->{ENTRY}}{$_} = $entry->{$_} } keys %$entry;
}
#- Load CUPS driver database if CUPS is used as spooler
diff --git a/perl-install/resize_fat/info_sector.pm b/perl-install/resize_fat/info_sector.pm
index 35449cedc..11aa7f153 100644
--- a/perl-install/resize_fat/info_sector.pm
+++ b/perl-install/resize_fat/info_sector.pm
@@ -28,7 +28,7 @@ sub read($) {
sub write($) {
my ($fs) = @_;
- $fs->{info_sector}{free_clusters} = $fs->{clusters}->{count}->{free};
+ $fs->{info_sector}{free_clusters} = $fs->{clusters}{count}{free};
$fs->{info_sector}{next_cluster} = 2;
my $info = pack $format, @{$fs->{info_sector}}{@fields};
diff --git a/perl-install/resize_fat/main.pm b/perl-install/resize_fat/main.pm
index 5a4810ed3..dd3e720e5 100644
--- a/perl-install/resize_fat/main.pm
+++ b/perl-install/resize_fat/main.pm
@@ -147,8 +147,8 @@ sub resize {
$fs->{nb_sectors} = $size;
$fs->{nb_clusters} = $new_nb_clusters;
- $fs->{clusters}{count}->{free} =
- $fs->{nb_clusters} - $fs->{clusters}{count}->{used} - $fs->{clusters}->{count}->{bad} - 2;
+ $fs->{clusters}{count}{free} =
+ $fs->{nb_clusters} - $fs->{clusters}{count}{used} - $fs->{clusters}{count}{bad} - 2;
$fs->{system_id} = 'was here!';
$fs->{small_nb_sectors} = 0;