Patrick Galbraith wrote:
Hi all!
Quick question - how do I ensure from C something that I eval on the
perl side, if it fails sets [EMAIL PROTECTED] Say for instance, I have something that
checks something in C, I return in a way that eval/$@ is set.
Thanks in advance!
Patrick
If I understand your issue, see the section on
"Warning and Dieing" in perlapi (http://perldoc.perl.org/perlapi.html)
In brief, use either croak() (or Perl_croak()), or set errsv
directly (from the perlapi page):
errsv = get_sv("@", TRUE);
sv_setsv(errsv, exception_object);
croak(Nullch);
If OTOH you're trying to validate $@ from C, then you
need to run under eval_pv/sv(). See
"Evaluating a Perl statement from your C program"
in perlembed (http://perldoc.perl.org/perlembed.html)
HTH,
Dean Arnold
Presicient Corp.