summaryrefslogtreecommitdiffstats
path: root/perl-install/Xconfig/xfreeX.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-22 21:59:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-22 21:59:30 +0000
commitdad25588ed26afe49277032b8b1b24b063e34efa (patch)
treeed2e1f85e3e34ab626550ef27e3a858fa57d308a /perl-install/Xconfig/xfreeX.pm
parente70327417f8ce3bd2a03c7da1fd46ea2a8e8e4b0 (diff)
downloaddrakx-dad25588ed26afe49277032b8b1b24b063e34efa.tar
drakx-dad25588ed26afe49277032b8b1b24b063e34efa.tar.gz
drakx-dad25588ed26afe49277032b8b1b24b063e34efa.tar.bz2
drakx-dad25588ed26afe49277032b8b1b24b063e34efa.tar.xz
drakx-dad25588ed26afe49277032b8b1b24b063e34efa.zip
perl_checker compliance for optional method arguments
Diffstat (limited to 'perl-install/Xconfig/xfreeX.pm')
-rw-r--r--perl-install/Xconfig/xfreeX.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/perl-install/Xconfig/xfreeX.pm b/perl-install/Xconfig/xfreeX.pm
index e8d5f33f4..7f79f19f9 100644
--- a/perl-install/Xconfig/xfreeX.pm
+++ b/perl-install/Xconfig/xfreeX.pm
@@ -15,14 +15,14 @@ sub empty_config {
}
sub read {
- my ($class, $file) = @_;
- $file ||= ($::prefix || '') . (bless {}, $class)->config_file;
+ my ($class, $o_file) = @_;
+ my $file = $o_file || ($::prefix || '') . (bless {}, $class)->config_file;
my $raw_X = Xconfig::parse::read_XF86Config($file);
bless $raw_X, $class;
}
sub write {
- my ($raw_X, $file) = @_;
- $file ||= ($::prefix || '') . $raw_X->config_file;
+ my ($raw_X, $o_file) = @_;
+ my $file = $o_file || ($::prefix || '') . $raw_X->config_file;
rename $file, "$file.old";
Xconfig::parse::write_XF86Config($raw_X, $file);
}
@@ -167,8 +167,8 @@ sub set_load_module {
}
sub get_resolution {
- my ($raw_X, $Screen) = @_;
- $Screen ||= $raw_X->get_default_screen or return {};
+ my ($raw_X, $o_Screen) = @_;
+ my $Screen = $o_Screen || $raw_X->get_default_screen or return {};
my $depth = val($Screen->{DefaultColorDepth});
my $Display = find { !$depth || val($_->{l}{Depth}) eq $depth } @{$Screen->{Display} || []} or return {};
@@ -177,9 +177,9 @@ sub get_resolution {
}
sub set_resolution {
- my ($raw_X, $resolution, $Screen_) = @_;
+ my ($raw_X, $resolution, $o_Screen_) = @_;
- foreach my $Screen ($Screen_ ? $Screen_ : $raw_X->get_screens) {
+ foreach my $Screen ($o_Screen_ ? $o_Screen_ : $raw_X->get_screens) {
$Screen ||= $raw_X->get_default_screen or internal_error('no screen');
$Screen->{DefaultColorDepth} = { val => $resolution->{Depth} };