[Boston.pm] Changing line number reported by errors
"Greg London" <email-2Ro/Dj86MvDSUeElwK9/[email protected]> Fri, 25 Oct 2019 09:56:59 -0500
| Newsgroups | gmane.comp.lang.perl.perl-mongers.boston |
|---|---|
| Message-ID | <[email protected]> |
Maybe not enough caffeine this morning but I'm trying to figure out how to change the line number reported by perl errors. I am slurping in different chunks of perl code from a file and doing an eval on them. Its working fine when it works but if there is a error, i print out $@ which always reports the line number from the start of the slurped text. Which is almost entirely not helpful. I would like to slurp the text, prepend something that indicates What line nukber itnshould assign to the first line, do an eval, and afterwards, return to normal line numbers. Thanks. --