Whilst i was working on the previous patch i posted, i noticed that the node_exists routine doesn't do exactly as documented.
The documentation states that it returns true if the node has ever been created, and false otherwise. Now, strictly speaking this is correct, but the truth value is actually the version number of the node. Also, it's retrieving the entire node, including metadata, to do this. Now (in some formatters), this method is called for every internal link on a node to determine how to show the link, so it is in the best interest to do the minimum necessary.
Therefore, what i suggest (after having talked it over with Earle), is to seperate node_exists into two seperate methods, one called node_exists that only does this check, and nothing more, and another called node_version, that is actually documented as returning the version number.
I have included two patches along these lines. One of them (CGI-Wiki-node_exists.diff) is against 0.50_01. The other is against my local dev-tree, which so far consists only of this patch and the earlier two.
Included along with the new method is a new test file that makes sure it is working properly. Thankfully, unlike the table-prefix changes, this does not add a very significant amount of time to the test run ;)