defined &$class is not how you detect if a class has been loaded (just using use...