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


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

the quoting does not make a difference. from the docs there are various ways of getting the code in. The problem seems to be more that the DATA handle is being read without being opened first.

inside Inline, c_calc::DATA is aliased into Inline::DATA, and then read in after requiring Socket, but this is used just for CR and LF definitions. I hardcoded those definitions and commented out the Socket require, to no effect. then the subroutines goes on to read-in the aliased Inline::DATA. (my $data = <Inline::DATA>) =~ s/$CR?$LF/\n/g;

I can compile a C program, using the gcc compiler which comes with Strawberry, I did so to ensure the C code was running before attempting to inline. This would indicate that I already have C compatibility from Strawberry, which makes the "not understanding C language" error contradictory.