in reply to Dynamically generating function callbacks
Generating functions at runtime is pretty simple in Perl. And your desire to avoid repetitive source code by doing so is worthy and desirable.
But I cannot make sense of your example -- which I suspect you've typed into the browser manually given the typo in calback_reply rather than cutting and pasting from actual code.
But I cannot relate this to anything in the second sample.
Or is that a 'placeholder' for a name that would need to be generated?
Basically what I'm saying is: Yes, what you want to do is both possible and a good idea, but if you want some help on how to do it, then you're going to have to post some real examples of the subs you want to generate -- even if you feel the need to change the function and parameter names a little to "protect the innocent" -- so we can get a feel for the pattern involved.
|
|---|