Hi,
There's a bug report about this at
http://rt.cpan.org/Ticket/Display.html?id=13084
It would be nice to come up with a fix, but I'm not 100% sure of what the
correct behaviour should be. (I've not personally used -T at all, and
probably never will.) I gather that the following script should work:
### script1 ###
#!/usr/bin/perl -T
use Inline Config =>
UNTAINT => 1,
SAFEMODE => 0;
use Inline C => <<'EOC';
void greet() {
printf("Hello World\n");
}
EOC
greet();
##################
And that the same script should also work if I replace the "SAFEMODE =>0;"
with "DIRECTORY => 'custom/location';"
Is that about it ?
Does anyone have an example of a simple Inline::C script that has UNTAINT
turned on and SAFEMODE turned off, but that should still fail with the
"Insecure dependency" error ?
Also some pointers to the sorts of things that SAFEMODE should detect might
be handy - though I guess I can probably uncover that for myself in the
Inline source. (One thing it apparently does is force the use of the
DIRECTORY option.)
I also intend to deal with:
http://rt.cpan.org/Ticket/Display.html?id=5207 (Can't specify INC, LIBS,
TYPEMAPS, MYEXTLIB using relative paths.)
http://rt.cpan.org/Ticket/Display.html?id=45417 (Broken Inline::C-Cookbook
weblink.)
http://rt.cpan.org/Ticket/Display.html?id=40140 (Recognise "ccache cc" as C
compiler.)
http://rt.cpan.org/Ticket/Display.html?id=16801 ($_ is not localized.)
Comments welcome.
Cheers,
Rob