I would like to create a new method on the fly.  Assuming I have a
variable containing the name I want to give the method, how can I create
it at runtime?

I will need to stick the values of some other variables into the code for
the method, too.

Feel free to point me at a section in the pickaxe book.