Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Setting $! in xs

by Prof Vince (Friar)
on Aug 06, 2011 at 20:48 UTC ( #918997=note: print w/ replies, xml ) Need Help??


in reply to Setting $! in xs

Just assign to errno in your C code. $! is magic, so it will be automatically updated the next time it is evaluated in Perl.

But you should do that only if the error code you want to pass this way is a meaningful errno code (for example, if it is given after a system call). For all the other cases, an exception is a much saner solution.


Comment on Re: Setting $! in xs

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://918997]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (13)
As of 2015-07-07 13:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls