I am mulling over a best practice for passing hash references for return data to/from functions.
On the one hand, it seems intuitive to pass only input values to a fun
The first one is better:
my ($ref_array,$ref_hash) = $this->getData('input');
The reasons are:
Note: the lines
@array = @{$ref_array};
%hash = %{$ref_hash};
are questionable, since you shallow-copy the whole data structures here. You can use references everywhere where you need array/hash, using -> operator for convenience.