Tom Lane wrote:
In the case of Perl I suspect it is reasonably possible to determine
whether there is an "eval" surrounding the call or not, although we
might have to get more friendly with Perl's internal data structures
than a purist would like.
Not really very hard. (caller(0))[3] should have the value "(eval)" if you are in an eval. There might also be some ways of getting this via the perlguts API although I'm not aware of it. Of course, if you're in a subroutine which is in turn called from an eval things get trickier, so we might have to walk the stack frames a bit.
cheers
andrew
---------------------------(end of broadcast)--------------------------- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]