in reply to embedded perl: check for compile errors without executing

I'm just an amateur, but perlembed shows code like
# SV* my_eval_sv(SV *sv, I32 croak_on_error) # if (croak_on_error && SvTRUE(ERRSV)) # croak(SvPVx_nolen(ERRSV));
for errors.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku

Replies are listed 'Best First'.
Re^2: embedded perl: check for compile errors without executing
by lorius (Novice) on Feb 06, 2010 at 10:45 UTC

    thanx zentara, but it seems to me that this is only available once the eval_sv has been called, i.e. the code has been executed. I would like to know about any compile errors without executing the code; similar to the command line "perl -c -e 'xxx'", but in an 'embedded way'

    I could write to file, make a system call, redirect the output to a file,.. but there is certainly a much easier more beautiful solution).