in reply to Re: Re: Re: Line Numbers
in thread Line Numbers

I've fairly recently started coding my (rare) uses of eval like this.

Hmmm... that might be a nice pragmatic module: one that steals the standard eval() and prefixes any string eval with package and line number of caller:

use strict; use warnings; BEGIN { *CORE::GLOBAL::eval = sub {print "standard eval replaced!\n"}; } eval "print qq{Hello world!\n}"; __END__ Hello world

Alas, it seems that the standard eval() cannot be replaced. ;-(

Liz