|
Lines 32-37
use C4::Biblio;
Link Here
|
| 32 |
use C4::Dates qw/format_date/; |
32 |
use C4::Dates qw/format_date/; |
| 33 |
|
33 |
|
| 34 |
use List::Util qw(shuffle); |
34 |
use List::Util qw(shuffle); |
|
|
35 |
use List::MoreUtils qw(any); |
| 35 |
use Data::Dumper; |
36 |
use Data::Dumper; |
| 36 |
|
37 |
|
| 37 |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
38 |
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS); |
|
Lines 591-598
sub least_cost_branch {
Link Here
|
| 591 |
|
592 |
|
| 592 |
# If the pickup library is in the list of libraries to pull from, |
593 |
# If the pickup library is in the list of libraries to pull from, |
| 593 |
# return that library right away, it is obviously the least costly |
594 |
# return that library right away, it is obviously the least costly |
| 594 |
my ($self) = grep( /$to/, @$from ); |
595 |
return ($to) if any { $_ eq $to } @$from; |
| 595 |
return ($self) if $self; |
|
|
| 596 |
|
596 |
|
| 597 |
my ($least_cost, @branch); |
597 |
my ($least_cost, @branch); |
| 598 |
foreach (@$from) { |
598 |
foreach (@$from) { |
| 599 |
- |
|
|