Re: [Boston.pm] Changing line number reported by errors
Uri Guttman <uri-X/[email protected]> Fri, 25 Oct 2019 12:27:03 -0400
| Newsgroups | gmane.comp.lang.perl.perl-mongers.boston |
|---|---|
| Organization | Perl Hunter |
| Message-ID | <[email protected]> |
On 10/25/19 12:22 PM, Uri Guttman wrote: > my understanding (to be corrected by greg) is that an error in evaled > perl code reports the line number in that code. he wants the line > number of the eval call itself. he can use __LINE__ to get that when > he checks the eval for any errors in the slurped in code. another idea: use carp to report the error (or one of the carp subs). check the eval for an error and carp $@. it should report the current line number of the eval. uri