use if (-d '.git'), Test::More => skip_all => 'in dev tree; distribution metadata not present'; use Test::More tests => #... # Your original "use Test::More" line goes here...