gildir has asked for the wisdom of the Perl Monks concerning the following question:
I have piece of perl code. I want to pre compile it, and store it in some kind of permanent storage for subsequent fast execution. I can compile code to coderef simply by $code = eval "sub { $code }"; bu how I store and restore such a code?
Yes, yes, I know that Perl is portable only in string source form. I know that this may cause problems. But I need it for short-term optimazation only, in Web server. Just to avoid compiling pieces of ebmede Perl code again and again.
I think that there is some module that can store pre-compiled perl code to file. That should be sufficient, but I just can't find that module on CPAN anymore. Could anyone help me, please.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: How to store CODE ref
by tachyon (Chancellor) on Nov 28, 2001 at 22:04 UTC | |
by gildir (Pilgrim) on Nov 28, 2001 at 22:44 UTC | |
by IlyaM (Parson) on Nov 28, 2001 at 23:03 UTC | |
by gildir (Pilgrim) on Nov 29, 2001 at 13:42 UTC | |
by IlyaM (Parson) on Nov 30, 2001 at 13:12 UTC | |
Re: How to store CODE ref
by Fletch (Bishop) on Nov 28, 2001 at 22:20 UTC | |
Re: How to store CODE ref
by IlyaM (Parson) on Nov 28, 2001 at 22:19 UTC | |
Re: How to store CODE ref
by perrin (Chancellor) on Nov 28, 2001 at 22:18 UTC |