applied a patch from cjm with slight modification to resolve RT#50723 (support use Foo::Bar (); etc)