|Don't ask to ask, just ask
Re: (Ovid) Re(2): ref, no, maybe?by Fastolfe (Vicar)
|on Jan 11, 2001 at 04:40 UTC
For what it's worth, in my opinion, your use of ref here is perfectly valid and makes your function very flexible and easy to use, for the uses you have for it.
I remember something in a project I was involved in in the distant past that made use of data structures a little like this:
Or maybe it was:
I don't fully remember the rationale for building a data structure like that, but I think it had something to do with decision-making, where if you'd come across a reference, only one of the references would be used, with control passing off to the next item when it was completed (something like that). I just remember that it required us to use 'ref' when processing it, and perhaps a bit of recursion. I'm perfectly willing to accept that this is bad practice, and I've learned a lot of Perl between then and now and it's likely that I might have come up with alternative way to accomplish what we were doing... *shrug*.