in reply to OO sub, hash or hash reference.
sub xxx { my $class = shift; my $args = ($#_ == 0) ? { %{ (shift) } } : { @_ }; [download]
NB: not my own work.
dave hj~