in reply to Perl based forum code that has good API
I doubt that you'll be able to find anything like that now.
For YaBB 3, we are building objects for things like User, Post, etc. that may be usable for what you're doing. It could theoretically be as easy as creating a new post object. We haven't gotten to that part of the work yet, we're still building/testing some deep parts of the core.
We are planning on releasing YaBB 3 next year--if you can wait that long you may be in luck. If you can't, I wish you luck in your quest to find an acceptable solution.