There is no way I know of to (re)set the eval counter, but the usual trick I use to associate evals with the evalled code is to embed a #line comment in your eval() string:
givesperl -le "eval q!print $^O! for 1..10; eval qq!#line 99 foo.cfg\ndie!; +print $@"
MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 MSWin32 Died at foo.cfg line 99.
In reply to Re: is it possible to access eval() counter?
by Corion
in thread is it possible to access eval() counter?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |