Maybe you could try eval_sv instead, which (in contrast to eval_pv) allows the G_KEEPERR flag to be specified (you wouldn't get your SV result, though...). Something like this (untested):
eval_sv(newSVpv(code.c_str(), 0), G_KEEPERR);
See also this thread and G_KEEPERR.
In reply to Re: perlapi - How to get compilation errors SV
by almut
in thread perlapi - How to get compilation errors SV
by gszczesz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |