From d26ccbbcd5d2eb3f419b750c4ad93c43aed134a2 Mon Sep 17 00:00:00 2001 From: J Pipkin Date: Thu, 28 Mar 2013 07:08:08 -0500 Subject: in get_build_queue(), keep last instance of repeated thing instead of first, so final queue is ordered correctly. --- SBO-Lib/lib/SBO/Lib.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'SBO-Lib/lib') diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index 770e300..13f5057 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -957,12 +957,14 @@ sub get_build_queue { ); add_to_queue(\%args); } - # Remove duplicate entries (leaving first occurrence) + # Remove duplicate entries (leaving last occurrence) + @$temp_queue = reverse @$temp_queue; my (%seen, @build_queue); FIRST: for my $sb (@$temp_queue) { next FIRST if $seen{$sb}++; push @build_queue, $sb; } + @build_queue = reverse @build_queue; return \@build_queue; } -- cgit v1.2.3