adrianh has asked for the wisdom of the Perl Monks concerning the following question:
I'm fairly sure the answer is no - but just in case...
Is there any way to get at the contents of a block eval so you can do the moral equivalent of:
eval { 1/0 }; if ($@) { print _MAGIC_CONTENT_OF_LAST_EVAL # outputs # { 1/0 }
(without mucking around with source filters that is)
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Any way to access the contents of a block eval?
by chromatic (Archbishop) on Oct 11, 2007 at 00:10 UTC | |
by adrianh (Chancellor) on Oct 12, 2007 at 13:02 UTC | |
Re: Any way to access the contents of a block eval?
by shmem (Chancellor) on Oct 10, 2007 at 17:41 UTC | |
Re: Any way to access the contents of a block eval?
by ikegami (Patriarch) on Oct 10, 2007 at 15:48 UTC | |
by adrianh (Chancellor) on Oct 12, 2007 at 12:56 UTC | |
by ikegami (Patriarch) on Oct 12, 2007 at 17:00 UTC | |
by adrianh (Chancellor) on Oct 16, 2007 at 13:16 UTC | |
by chromatic (Archbishop) on Oct 12, 2007 at 16:29 UTC | |
Re: Any way to access the contents of a block eval?
by cdarke (Prior) on Oct 10, 2007 at 15:39 UTC |
Back to
Seekers of Perl Wisdom