Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Inline CPAN distribution.

Report information
The Basics
Id: 17774
Status: resolved
Priority: 0/
Queue: Inline

People
Owner: Nobody in particular
Requestors: sisyphus1 [...] optusnet.com.au
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: No Inline C functions bound to Perl
Foo.pm 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; ------------------------- try.pl looks like: ------------------------- #!perl -w use Foo; use Inline C => <<'EOC'; int silly() { int x = 1234567890; return x; } EOC my $i = silly; print $i, "\n"; ------------------------- When I run 'perl try.pl' then, assuming Foo.pm has not been previously compiled, I get: Warning. No Inline C functions bound to Perl Check your C function definition(s) for Inline compatibility 1234567890 The message is misleading (clearly the 'silly' function is bound to Perl) and should really name the file to which the warning relates. I also feel that *any* function that doesn't bind to perl should be explicitly named (including package name - eg 'Foo::foo'). This would generally be of assistance, and an improvement to the Inline::C diagnostics. Admittedly, one sometimes includes Inline C functions that are not intended to bind to perl ... but that's the nature of 'warnings' - they're telling you that there *might* be a problem, not that that there definitely *is* a problem If you happen to 'use warnings;' instead of running under the '-w' switch, you don't even get to see that warning (because 'use warnings;' doesn't set $^W). Not sure how to fix that. It's pointless having C.pm check to see whether the warnings module has been loaded - it invariably has been loaded, presumably by one of the other modules that Inline loads in. Perhaps that warning should appear, irrespective of whether the user has requested warnings or not ? I'm using inline-0.44, perl-5.8.8, on Windows 2000. Cheers, Rob
RT-Send-CC: sisyphus [...] cpan.org
This has been (at least partly) addressed in Inline-0.45, though it's untested by the test suite, and I'm therefore closing the ticket. The issue has been addressed to the extent that, if for some file, there are no Inline C functions bound to perl, then the warning now (additionally) specifies the name of that file. If there's a problem with the way this has been dealt with, please feel free to re-open the ticket (or submit a new report). To further discuss the issue (but without re-opening the ticket), consider posting to the Inline mailing list, or send a private email to sisyphus at cpan dot org. Thanks for the report !! Cheers, Rob