if ( eval { Class->does( 'interface' ) } ) { # do stuff }