in reply to Problem with AUTOLOAD and Windows
It seems that the C code uses $! as an (ill-advised) way to communicate "constant not found" to the caller, instead of die-ing right from the C code. The C code seems to set $! to ENOENT, so the most consistent way to handle that from the Perl code would be to check $! for ENOENT instead of trying to do string matching:
... manually coded string lookup table ... not_there: errno = ENOENT; return 0; }
I would look towards POSIX to get at the value of ENOENT for your OS, and then use that for the comparison.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem with AUTOLOAD and Windows
by Brutha (Friar) on Nov 23, 2011 at 12:59 UTC |