in reply to Parameters for object callback

Take a look at how HTML::Parser defines callbacks. Basically, you create a callback specifying a simple text string giving what you want in the callback.

If your library builds a closure based on the user-supplied string, it could be quite fast.

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.