http://qs321.pair.com?node_id=1150915


in reply to Re: Using module with c code in perl program.
in thread Using module with c code in perl program.

Also note Inline::Files did not install when I ran the cpan install Inline cmd
Did you actually install Inline::C, or just Inline (without ::C)?
  • Comment on Re^2: Using module with c code in perl program.

Replies are listed 'Best First'.
Re^3: Using module with c code in perl program.
by Don Coyote (Hermit) on Dec 22, 2015 at 00:23 UTC

    Ok, promising start, but then failed

    Inline::C was not installed. I installed Inline::C and the script with the code worked. I then tested the script with the C code in the module and that worked, firstly with the Test::More module being used, and then without the ok routine, and it worked. But then it did not continue to work.

    I'm just trying to recreate this now.

    ...

    The script with the Inline code embedded runs whether Testing is active or not.

    The Module import still does not open the DATA filehandle. Stepping through in db, Inline calls init which calls read_DATA, which requires Socket, so it jumps between Strict, Socket, Exporter, and XS_Loader. Then attempts the read on the unopened DATA filehandle.

    At this point I need to look a bit further in detail as to what is happening.

Re^3: Using module with c code in perl program.
by k0shinus (Novice) on Dec 22, 2015 at 08:48 UTC

    For some reason there is an error when i tried to install Inline::C both on Ubuntu and Windows. So i was sent portable perl version with preinstalled Inline::C.