|Just another Perl shrine|
Re: Can't install Text::Metaphone with Strawberry Perlby BrowserUk (Patriarch)
|on Oct 15, 2008 at 14:35 UTC ( #717239=note: print w/replies, xml )||Need Help??|
Tweak Metaphone.xs by adding #undef free as shown below, and the problem will probably go away:
If this works for you, contact the module author and suggest the change to him.
Rational: The memory being freed is allocated using the C-runtime's malloc(), but the XS environment redefines free() to use it's idea of what that function should be, and it is in that redirected function things go awry. (Which is totally bogus because they haveSafefree() for memory allocated by the Perl allocator.)
By using #undef free before calling it, you get back the CRT free, and the error message and subsequent traps go away (in those cases I've tried).
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section Seekers of Perl Wisdom