Can you give us a more specific example of what you are trying to do? The closest thing that I can think of, from what you're describing, is to use AUTOLOAD to autogenerate a subroutine and install it in the symbol table to avoid the repeated expense of regenerating the code. I have an example of that here.
If what you're trying to do is use a closure, merlyn has an article on closures that you may wish to read.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.
In reply to (Ovid - closures?) Re: Storing the bytecode compiled with eval()
by Ovid
in thread Storing the bytecode compiled with eval()
by ctl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |