in reply to can I get a callback when I call a function

The Perl debugger has an API, which you could use for your purposes. See DB for the documentation.

If there's a reason you can't use that, another common technique is to write your own runloop - but that's probably much more effort.

Perl 6 - links to (nearly) everything that is Perl 6.
  • Comment on Re: can I get a callback when I call a function