In short, the problem is with large, mostly-read data that contains embeded perl code. For example, ePerl templates. For efficiecy reasons they must be pre-compiled. That's perfectly easy so far. But I want to change the templates while server is running. No chance to do this efficiently in Apache one-process-per-request architecture.
So I come up with an idea to store templates in GDBM. But what about embeded perl here? If I whould store it in source form, it will be terribly slooow, compile it in every HTTP request. If I compile it in every httpd process, it will be terribly large. Now, I must pre-compile perl code and store it in GDBM in pre-compiled form.
How to do that?
Ad B::Bytecode. I have checked this module, and it looks good. But I can't fugure out how to use it no a piece of perl source that I have in scalar variable instead of whole perl program. Could anyone please help me with this. Some simple 3-line example would be more that sufficient. Thanks a lot.
In reply to Re: Re: How to store CODE ref
by gildir
in thread How to store CODE ref
by gildir
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |