From d65db2b251e09a1f56bec3aa09ac764e7c7f9d6f Mon Sep 17 00:00:00 2001 From: Jacob Pipkin Date: Sun, 4 Nov 2012 11:11:58 -0600 Subject: fix to check-and-dereference-array-ref logic. passes tests. --- SBO-Lib/lib/SBO/Lib.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'SBO-Lib/lib/SBO/Lib.pm') diff --git a/SBO-Lib/lib/SBO/Lib.pm b/SBO-Lib/lib/SBO/Lib.pm index 9774bc9..c579e67 100644 --- a/SBO-Lib/lib/SBO/Lib.pm +++ b/SBO-Lib/lib/SBO/Lib.pm @@ -222,7 +222,10 @@ sub get_inst_names ($) { sub get_sbo_location { exists $_[0] or script_error 'get_sbo_location requires an argument.'; my @sbos = @_; - @sbos = $sbos[0] if ref $sbos[0] eq 'ARRAY'; + if (ref $sbos[0] eq 'ARRAY') { + my $tmp = $sbos[0]; + @sbos = @$tmp; + } state $loc_store = {}; # if scalar context and we've already have the location, return it now. unless (wantarray) { -- cgit v1.2.3