in reply to Tab Stop Converter

Is there code somewhere that will guess the tabstop size?

I'd like to hook it up to vim so that perl/C/etc sets the tab size as the original author uses
(modelines obviously won't do)