missingthepoint has asked for the wisdom of the Perl Monks concerning the following question:
Greetings, monks.
I've been tinkering with Inline::C recently, and found myself printing error messages from C directly. I consider this bad juju for all but trivial uses of C-in-Perl... So what is the best way to propagate errors at the C level to Perl? I think some of Perl's builtins (the ones which do syscalls?) set $! on error. Can I set this variable from C? Is there a better way to report errors that occur in C code?
Awaiting your wisdom,
mtp
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Propagating errors in C code to Perl
by betterworld (Curate) on Sep 05, 2008 at 13:42 UTC | |
|
Re: Propagating errors in C code to Perl
by Joost (Canon) on Sep 05, 2008 at 13:50 UTC | |
by missingthepoint (Friar) on Sep 06, 2008 at 07:08 UTC | |
by Joost (Canon) on Sep 07, 2008 at 12:39 UTC | |
by missingthepoint (Friar) on Sep 08, 2008 at 00:26 UTC | |
|
Re: Propagating errors in C code to Perl
by sasdrtx (Friar) on Sep 05, 2008 at 22:35 UTC | |
by missingthepoint (Friar) on Sep 06, 2008 at 07:01 UTC |