in reply to Re: eval that doesn't exec?
in thread eval that doesn't exec?

chromatic's answer looks like it's probably what I want, but, just to be sure, I'm looking for a way to store code in a database, pull it out as needed, and repeatedly execute it without needing to recompile on each execution.

Replies are listed 'Best First'.
Re: Re: Re: eval that doesn't exec?
by Dog and Pony (Priest) on May 11, 2002 at 17:47 UTC
    Well, maybe you would want to look at B::Bytecode or Storable then. :)
    You have moved into a dark place.
    It is pitch black. You are likely to be eaten by a grue.
      So I can freeze sub ref's and store it, to later retrieval and execution?
        Not universally. Perl doesn't have enough introspection (yet!) to be able to take a compiled subroutine and reliably marshal it.

        When you said "stored" originally, I bet most people just presumed "in a scalar", not "in a database".

        -- Randal L. Schwartz, Perl hacker