in reply to newbi with inline C

It works for me exactly as you pasted it. However, there's a strict violation which is probably not preventing it from working, but still not very nice.

use strict; and you will see a problem. If that doesn't make it clear enough, also add use diagnostics; You'll see the following:

Bareword "C" not allowed while "strict subs" in use at mytest.pl line +6. Execution of mytest.pl aborted due to compilation errors (#1) (F) With "strict subs" in use, a bareword is only allowed as a subroutine identifier, in curly brackets or to the left of the "=> +" symbol. Perhaps you need to predeclare a subroutine? Uncaught exception from user code: Bareword "C" not allowed while "strict subs" in use at mytest.pl l +ine 6. Execution of mytest.pl aborted due to compilation errors. shell returned 255

Change use Inline C; to use Inline 'C';.

I'd also be curious as to how Inline and Inline::C were installed, and if they pass their test suites on install. It may be they're not correctly installed. It would be hard for the test suite to pass cleanly yet this code snippet not work.


Dave