|
my @checks ;
if (-d 'blib/script' )
{
push @checks , 'blib/script' ;
}
elsif (-d 'bin' )
{
push @checks , 'bin' ;
}
if (-d 'blib' )
{
push @checks , 'blib' ;
}
else
{
push @checks , 'lib' ;
diag "checking lib instead of blib" ;
}
my $dir = path( '~/.xor/cache' );
$dir ->mkpath;
$dir -> chmod (0700);
my $ua = HTTP::Tiny::Mech->new(
mechua => WWW::Mechanize::Cached->new(
cache => CHI->new(
expires_in => 60*60*24,
driver => 'File' ,
root_dir => $dir ->stringify,
),
),
);
my $mock1 = mock 'Test::Pod::LinkCheck::Lite' => (
override => [
_user_agent => sub { $ua },
],
);
my $mock2 = mock 'HTTP::Tiny::Mech' => (
override => [
head => sub { shift ->get( @_ ) },
],
);
Test::Pod::LinkCheck::Lite
->new
->all_pod_files_ok( @checks );
done_testing;
|