Stas Bekman wrote:
>
> Hello, Brian
>
> I've sent this to the list a week ago, with no replies.
>
> This issue is quite urgent, since I'm authoring a mod_perl book for ORA,
> (at the completing stage) and I try to use Inline in examples instead of
> XS. If the below problem doesn't get resolved, I'll have to fall back to
> XS examples :(
Stas,
Sorry, to not CC you. Your email started a sizable thread. You can read
read the archive at http://www.mail-archive.com/[email protected]/
I have a patch to allow Inline to work with -T. It seems to work OK, but
doesn't yet work for all test cases. I was going to work on it some more
before releasing it to the mailing list for testing. But since you're in
need, I'll release it now.
Whether the patch gets released this week or not, you should be able to
finish your book, because I've decided on the syntax for taint issues.
See http://www.mail-archive.com/[email protected]/msg00084.html for
details, but basically I'm adding "UNTAINT" and "SAFEMODE" options. The
patch implements "UNTAINT", and "SAFEMODE" will follow later (since it's
more involved).
With the patch you can say:
perl -MInline=Untaint -Tle 'use Inline C=>q{SV*JAxH(char*x){return
newSVpvf("Just Another %s Hacker",x);}};print JAxH+Perl'
FYI, this patch was a bear to create. I had to rewrite functions from
File::Path which appears to not be taint safe. Also I got some extremely
hard to debug behaviour that for the moment has mysteriously
dissappeared. It seemed to be coming from Carp.pm. Untainting a normal
situation works fine. But if the Inline code is generating errors, and
the error messages seem bogus, try comparing without -T.
Install instructions:
save the patch in your home directory
download Inline-0.31.tar.gz from CPAN.
tar xvzf Inline-0.31.tar.gz
cd Inline-0.31
applypatch ~/Inline-0.31-patch-2
perl Makefile.PL
make test
make install
NOTE: makepatch/applypatch is available at
http://www.cpan.org/authors/id/JV/makepatch-2.00_03.tar.gz
Let me know if that works. I'll keep working on the code.
BTW, I'm happy that you are promoting Inline in your book. I would
gladly proof the applicable texts for you. And again, sorry for not
noticing your comment about not being on the list. You can always jump
on temporarily by emailing [EMAIL PROTECTED] . It's fairly low
traffic at this point.
< two hours pass >
The patch now works with all tests. This does not mean the patch is
ready for primetime, only that it passed my measly test harness. I would
appreciate anybody who wants to use Inline in -T mode, to please test.
Cheers, Brian
--
perl -MInline=Untaint -Tle 'use Inline C=>q{SV*JAxH(char*x){return
newSVpvf("Just Another %s Hacker",x);}};print JAxH+Perl'
Inline-0.31-patch-2