As I understand this problem, dragonchild actually proposed a solution that actually solves your problem, but you somehow overlooked that.
in reply to Re: Re: Forks.pm dilemma
in thread Forks.pm dilemma
Consider: you'll define functions in XS with some changed name (use some prefix for example), without PROTOTYPE keyword and then provide prototype in forks.pm, and those wrapper functions will call proper XS function.
Why this will not work in your case?
I did same thing for Tcl perl module, where I solved another problem this way: it was too complicated for me to do logic in XS, so I decided to move it to Perl side.
I'm not knowledgable enough to say you how to do a PROTOTYPE in perl-5.6.x
Courage, the Cowardly Dog