diff options
author | Jacob Pipkin <j@dawnrazor.net> | 2012-11-04 11:11:58 -0600 |
---|---|---|
committer | Jacob Pipkin <j@dawnrazor.net> | 2012-11-04 11:11:58 -0600 |
commit | d65db2b251e09a1f56bec3aa09ac764e7c7f9d6f (patch) | |
tree | eaba2a43128629d62b48c724b737280a66f138b2 /SBO-Lib/lib | |
parent | 3e13816918e42d1a2946f2bd2b6f9b93e865eb16 (diff) | |
download | sbotools2-d65db2b251e09a1f56bec3aa09ac764e7c7f9d6f.tar.xz |
fix to check-and-dereference-array-ref logic. passes tests.
Diffstat (limited to 'SBO-Lib/lib')
-rw-r--r-- | SBO-Lib/lib/SBO/Lib.pm | 5 |
1 files changed, 4 insertions, 1 deletions
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) { |