in reply to Re: The correct way to return arrays from a module
in thread The correct way to return arrays from a module

What do you do when you have a reference to complex data structure, like a hash of arrays of objects...?

qq

  • Comment on Re^2: The correct way to return arrays from a module

Replies are listed 'Best First'.
Re^3: The correct way to return arrays from a module
by Prior Nacre V (Hermit) on Aug 08, 2004 at 09:39 UTC

    If you mean in terms of prefix usage, the answer is nothing more than already described. I did consider extending this prefix set quite a few years ago but decided it was not useful. In cases where I think confusion is possible, I simply use the remainder of the name to disambiguate. As a last resort, in cases of extreme comlexity, I use comments to describe the complete structure.

    The main point is that the following should be known to be correct syntax:

    $rh_abc->{def} $ra_ghi->[jkl] $rc_mno->('pqr')

    from inspection of the variable name. Without the prefixes, inspection of the code where the data originated (often in a separate module) is required.

    Regards,

    PN5