|go ahead... be a heretic|
Re^2: Can I check if a loop's scope is entered for the first time? (Devel::Callsite)by LanX (Sage)
|on May 06, 2018 at 19:59 UTC||Need Help??|
Thanks Damian, but I'm afraid this is not solving my problem, just another one. *
This is just a more secure way of using line and file from caller .
But this will only work well if you always finish the loop without exiting in the middle, since you are only initializing once by the first entry and letting the iteration starting new after a full loop.
Consider this example showing that your iterators are not reset after breaking the loop.
NB: each has of course the same (and more) limitations.
*) There are different kinds of iterators, please correct me if I'm missing a way to apply this to my kind of iterators ...