in reply to How can one determine context within FETCH?
Well, no. In both cases, you're fetching a scalar. In the second case, it's a reference to an array. I tried this expression: "($proc->{'/var'})[0]", and it's still getting a scalar, probably because that's all you ever get out of a hash.
To do what you want to do, you're going to have to explicitly tell the object what you want. Here are some ideas:
By the way, what you're doing reminds me of Path::Class, though it's not exactly the same thing.
Update: Another thought for you: ditch the hash interface completely. Then you can say "$proc->get_x('/var')" and "$proc->get_y('/var')" and anything else you want.
|
|---|