in reply to Profiling Embedded Perl

I think I figured out how to make it work, but I don't really understand why.

If I move the code I was running using -e on the command line into an eval_pv, then just eval "1" on the command line, and do all my eval_pv's before calling perl_run, things seem to work.

E.g.:

interpreter = perl_alloc( ); perl_construct(interpreter); perl_parse(interpreter, xs_init, argc, argv, NULL); eval_pv(install_sig_handlers, 0); eval_pv(my_code, 0); // profiling, debugging etc. work perl_run(interpreter); perl_destruct(interpreter); perl_free(interpreter);