I control depth of field by having a locator set up to represent the point of sharp focus. Then write an expression such that you calculate the distance between the perpective camera and the focus locator using pythagoras's theorem.
You then assign perspShape.focusDistance with this value in the expression.
It's also a good idea to add other attributes to the focus locator to control the fStop and focus region scale parameters.
If you have trouble with this, email me and I'll send you the scene set up with locators.