Ok, this one is a long shot, but i figure if anyone would know or have some sly tricks up their sleeves, it would be the monks....
Short version:
Is there a way to dynamically include perl code into a C program at runtime?
Long version:
i'm creating a daemon and originally planned to use shared libraries for dynamic functionality (depending on a config file, it would either load library A to interface with the mysql database, or library B to interface with a special format of text file, etc). This daemon would have some special characteristics that only a persistant daemon would run. I was hoping to be able to use pre-existing code to base the dynamic libs on...
Problem is, when i first wrote these programs, i wrote one (the file parser) in C and another (the mysql interface) in perl (using DBI). Rather than rewrite the perl code in C, i decided to experiment - i tried perlcc, with no avail (creating shared libraries is aparently disabled) I read up on
Calling Perl from C Programs as well, but that appeared to only be able to compile in perl statically to the executable. So my question is this: is there a way of creating an equivilant system to loading a .so into a C program, instead using perl? Or am i stuck having to either rewrite it in C or exec the perl program as a seperate executable (not desirable)?