Loading modules from DBI?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View

I've got a bunch of templates which also happen to be perl objects. I would like
to stick them in postgresql and then 'require' or 'use' at runtime after
extracting them as text from the database.  

What is the best way to do this?  

Thanks in advance!  

Re: Loading modules from DBI?

Quoth domestuff@gmail.com:
Quoted text here. Click to load it

Do you mean something other than eval? If so, you will have to explain
what you want.

If you're asking how to serialise them in the first place, you can use
Data::Dumper or D::D::Streamer, though it may be better to use Storable
and put the stored value in a bytea rather than a text column.

If these objects have non-trivial connections to other objects you will
need to think about how you're going to serialise that information and
set them up again afterwards. Again, if you want help with that you will
need to explain a bit more about what you're doing.


Site Timeline