On 06/08/2011 10:15, Beau E. Cox wrote:
Hi -
I am a bit confused about how to set $! from within an xs module. I have
searched perlxstut, perlxs, and perlguts without really understanding what
is involved. Can some one either point me to a module that sets $! or give
me a short description on how it is done?
I have never written XS code to do this, but since perldoc perlvar says
If used numerically, yields the current value of the C "errno"
variable, or in other words, if a system or library call fails,
it sets this variable.
I imagine that assigning to errno in your C code would do the trick.
Whether that also propagates to the contents of %! I cannot say.
Rob
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/