#include #include #include #include static PerlInterpreter *my_perl; int main(void) { char *var; char *embedding[] = {"", "-e", "0"}; my_perl = perl_alloc(); perl_construct(my_perl); perl_parse(my_perl, NULL, 3, embedding, NULL); perl_run(my_perl); eval_pv("use MyConfig", TRUE); var = SvPV_nolen(get_sv("MyConfig::var", TRUE)); printf(">%s<\n", var); return(EXIT_SUCCESS); }