Subject: | incorrect substitution regexps in ParseXS.pm? |
Date: | Sat, 13 Feb 2010 02:32:14 +0200 |
To: | bug-ExtUtils-ParseXS [...] rt.cpan.org |
From: | Andriy Gapon <avg [...] icyb.net.ua> |
I have Perl 5.10.1 installed here and I get errors like the following during
build of p5-Cairo:
Error: '_OUTLIST double' not in typemap in Cairo.xs
Please note '_OUTLIST' in the diagnostics.
I looked at ParseXS.pm and see instances of code like the following:
$arg =~ s/^(IN|IN_OUTLIST|OUTLIST|OUT|IN_OUT)\s*//;
I am not sure how that works for you / in other versions of perl, but here the
first matching alternative wins.
That is, if $arg is something like "IN_OUTLIST xxx", then the expression above
will strip leading "IN" instead of "IN_OUTLIST" as must have been intended.
I think that match alternatives in the substitute expressions must be sorted
properly.
Better yet, to avoid problems in the future, use of alternatives should be
avoided in the substitute expression. Something more obvious has to be used here.
--
Andriy Gapon