For me, $data->{API} doesn't exist ... not sure of the best way to fix this. Turns out the reason I couldn't generate the error is that I now don't run using the '-w' switch. Instead I 'use warnings;' .... which doesn't set $^W. (This in itself is an Inline::C bug.)
If I've understood, I can fairly easily re-create your situation. If I create a Foo.pm that looks like:
package Foo;
use Inline C => <<'END_OF_C_CODE';
double * foo() {
double a = 123.456, *x;
x = &a;
return x;
}
END_OF_C_CODE
1;
and a 'test.pl' that looks like:
#!perl -w
use Foo;
use Inline C => <<'END_OF_C_CODE';
int foo2() {
int x = 1234567890;
return x;
}
END_OF_C_CODE
print "All compiled\n";
then when I run 'perl test.pl' I get:
D:\pscrpt\inline>perl test.pl
Warning. No Inline C functions bound to Perl
Check your C function definition(s) for Inline compatibility
All compiled
with no indication that the warning was in reference to Foo.pm only.
Is it ok with you if I file reports at rt.cpan about both bugs ? ... or would you prefer to attend to it yourself ?.
Probably leave it up to Ingy as how he wants to deal with them. He is (or claims to be :-) currently working towards the release of Inline-0.45.
Cheers,
Rob
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.