use Inline 'info', 'force', 'clean'; causes problems
Closed this issue · 2 comments
AndyColson commented
With use Inline 'info', 'force', 'clean'; gcc compiles this code fine, but perl returns 'undefined sub main::add'
#!/usr/bin/perl
use strict;
use warnings;
use Inline 'info', 'force', 'clean';
use Inline 'CPP';
print "9 + 16 = ", add(9, 16), "\n";
print "9 - 16 = ", subtract(9, 16), "\n";
__END__
__CPP__
random junk;
int add(int x, int y) {
return x + y;
}
int subtract(int x, int y) {
return x - y;
}
daoswald commented
Just for clarification, this can be reduced to the following case:
`use Inline 'info';
use Inline CPP => <<'EOCPP';
int add (int x, int y) {
return x+y;
}
EOCPP
print add(1,1), "\n";
`
So in other words, the 'info' config option is the trigger for the bug.
mohawk2 commented
Problem here was Inline::CPP
's info
method wasn't calling its superclass info
. The PR fixes that.