in reply to Re^2: How to distinct the call position of a sub?
in thread How to distinct the call position of a sub?

And beside this, iterator are just an example for a general problem to know "which call is this".

I don't think there's a reliable solution, which is why I think any design based on having this information is flawed. What do you expect to get if you're called from string eval?

  • Comment on Re^3: How to distinct the call position of a sub?

Replies are listed 'Best First'.
Re^4: How to distinct the call position of a sub?
by LanX (Saint) on Nov 24, 2008 at 21:36 UTC
    > What do you expect to get if you're called from string eval?

    what do you expect when you call foreach from string eval?
    Well you bring a good argument against using the linenumber from caller.

    Cheers Rolf