diff options
author | Olivier Thauvin <nanardon@mandriva.org> | 2004-11-25 14:28:02 +0000 |
---|---|---|
committer | Olivier Thauvin <nanardon@mandriva.org> | 2004-11-25 14:28:02 +0000 |
commit | cb4d4260f8cd9013672e4cf91d1a7fbd90486367 (patch) | |
tree | fd4597561083e61c0c47ceba25a5aef41b33ade1 /URPM.pm | |
parent | 14d502eb16305a1133c5d0fea18b660018e063bb (diff) | |
download | perl-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.pm | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -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) = @_; |