summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-05-25 10:21:09 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-05-25 10:21:09 +0000
commit7f26f4486207e8775f6e1d5df5658687737368fb (patch)
tree33214134a9bd1a74b42f24b2114f577ab6c14402 /perl-install
parent94a5a592f91fcf367e00ee14925c731c0206106a (diff)
downloaddrakx-7f26f4486207e8775f6e1d5df5658687737368fb.tar
drakx-7f26f4486207e8775f6e1d5df5658687737368fb.tar.gz
drakx-7f26f4486207e8775f6e1d5df5658687737368fb.tar.bz2
drakx-7f26f4486207e8775f6e1d5df5658687737368fb.tar.xz
drakx-7f26f4486207e8775f6e1d5df5658687737368fb.zip
Mark an argument as optional
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/pkgs.pm10
1 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index d793ae87d..f8e9c8583 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -1481,11 +1481,11 @@ sub new { my ($class, %h) = @_; bless \%h, $class }
#- retrieve medium by id (usually a number) or an empty placeholder
sub by_id {
- my ($medium_id, $packages) = @_;
- $packages = $::o->{packages} unless defined $packages;
- log::l("select $medium_id among ".join(",",keys%{$packages->{mediums}}));
- defined $packages->{mediums}{$medium_id}
- ? $packages->{mediums}{$medium_id}
+ my ($medium_id, $o_packages) = @_;
+ $o_packages = $::o->{packages} unless defined $o_packages;
+ log::l("select $medium_id among ".join(",",keys%{$o_packages->{mediums}}));
+ defined $o_packages->{mediums}{$medium_id}
+ ? $o_packages->{mediums}{$medium_id}
: bless { invalid => 1 };
}