a bit more complex example on using perl, c++ and xs