aboutsummaryrefslogtreecommitdiffstats
path: root/URPM.pm
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2004-11-25 14:28:02 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2004-11-25 14:28:02 +0000
commitcb4d4260f8cd9013672e4cf91d1a7fbd90486367 (patch)
treefd4597561083e61c0c47ceba25a5aef41b33ade1 /URPM.pm
parent14d502eb16305a1133c5d0fea18b660018e063bb (diff)
downloadperl-URPM-cb4d4260f8cd9013672e4cf91d1a7fbd90486367.tar
perl-URPM-cb4d4260f8cd9013672e4cf91d1a7fbd90486367.tar.gz
perl-URPM-cb4d4260f8cd9013672e4cf91d1a7fbd90486367.tar.bz2
perl-URPM-cb4d4260f8cd9013672e4cf91d1a7fbd90486367.tar.xz
perl-URPM-cb4d4260f8cd9013672e4cf91d1a7fbd90486367.zip
- allow to use an array of id instead (start .. end) in functions.
Diffstat (limited to 'URPM.pm')
-rw-r--r--URPM.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/URPM.pm b/URPM.pm
index 136d394..1b89e23 100644
--- a/URPM.pm
+++ b/URPM.pm
@@ -75,6 +75,16 @@ sub search {
return $best;
}
+# Olivier Thauvin:
+# Return @$listid, $start .. $end or the whole deplist id
+# according given args
+sub build_listid {
+ my ($urpm, $start, $end, $listid) = @_;
+
+ @{$listid || []} > 0 ? @{$listid} :
+ ((defined($start) ? $start : 0) .. (defined($end) ? $end : $#{$urpm->{depslist}}));
+}
+
sub traverse {
my ($urpm, $callback) = @_;