# from Nicholas Clark # on Saturday 05 January 2008 14:24: >Not tested, but, can you > >1: grab the address of print's op from PL_ppaddr >2: store it somewhere useful >3: replace it in PL_ppaddr with your own function
That would be cool. >Your own function calls the original, and then before returning, > checks the return value on the stack. If it indicates fatal, then > check the calling context. If that's void, croak. > >Otherwise return normally. Hmm, can it also have a lexical pragma with $^H fun? Sketch: use fatal; while(...) { ... print "foo\n"; } no fatal; And now the aforementioned Perl::Critic class will have an even harder time dealing with that ;-) --Eric -- But as soon as you hear the Doppler shift dropping in pitch, you know that they're probably going to miss your house, because if they were on a collision course with your house, the pitch would stay the same until impact. As I said, that one's subtle. --Larry Wall --------------------------------------------------- http://scratchcomputing.com ---------------------------------------------------