Let's assume we have a test for an HTML generator.
Let's also assume that if we have HTML::Lint, we want to lint the generated code.
require HTML::Lint;
my $lint = HTML::Lint->new;
isa_ok( $lint, 'HTML::Lint' );
$lint->parse( $some_html );
is( $lint->errors, 0, 'No errors found in HTML' );
Since HTML::Lint is optional, this test will fail if you don't have it.