Thanks for the good pointer - this indeed avoided the recursion issue. However another issue has become apparent in that not all subdirectories and functions are created - so only MyTypes and MyInterfaces, not MyElements.
It looks like someone else has had this problem though I can't see a reply to it:
http://www.cpanforum.com/posts/11896
Any idea how to get all directories? I'll also cross post to their thread.
Nb: If you are interested in betting exchange APIs, the Betdaq one is also free so you can see the
issues for yourself:
https://api.betdaq.com/v2.0/API.wsdl