On Mon, Nov 13, 2006 at 08:56:14AM +0100, Jeffrey Ratcliffe wrote: > There are three forms of the C++ new() function, depending on whether > you are providing a numerator and denominator as initialisation, > another fraction, or nothing. Can I wrap all three with one function, > or do I have to create three Perl functions?
Yes, but you'll have to put in explicit logic to decide which C++ new to use inside your XS code. I'm unaware of any way to automatically wrap overloaded functions. Nicholas Clark