################################################################################
#
#            !!!!!   Do NOT edit this file directly!   !!!!!
#
#            Edit mktests.PL and/or parts/inc/podtest instead.
#
#  This file was automatically generated from the definition files in the
#  parts/inc/ subdirectory by mktests.PL. To learn more about how all this
#  works, please read the F<HACKERS> file that came with this distribution.
#
################################################################################

use FindBin ();

BEGIN {
  if ($ENV{'PERL_CORE'}) {
    chdir 't' if -d 't';
    unshift @INC, '../lib' if -d '../lib' && -d '../ext';
    require Config; import Config;
    use vars '%Config';
    if (" $Config{'extensions'} " !~ m[ Devel/PPPort ]) {
      print "1..0 # Skip -- Perl configured without Devel::PPPort module\n";
      exit 0;
    }
  }

  use lib "$FindBin::Bin";
  use lib "$FindBin::Bin/../parts/inc";

  die qq[Cannot find "$FindBin::Bin/../parts/inc"] unless -d "$FindBin::Bin/../parts/inc";

  sub load {
    require 'testutil.pl';
    require 'inctools';
  }

  if (0) {
    load();
    plan(tests => 0);
  }
}

use Devel::PPPort;
use strict;
BEGIN { $^W = 1; }

package Devel::PPPort;
use vars '@ISA';
require DynaLoader;
@ISA = qw(DynaLoader);
bootstrap Devel::PPPort;

package main;

my @pods = qw( HACKERS PPPort.pm ppport.h soak devel/regenerate devel/buildperl.pl );

my $reason = '';

if ($ENV{'SKIP_SLOW_TESTS'}) {
  $reason = 'SKIP_SLOW_TESTS';
}
else {
  # Try loading Test::Pod
  eval q{
    use Test::Pod;
    $Test::Pod::VERSION >= 1.41
        or die "Test::Pod version only $Test::Pod::VERSION";
    import Test::Pod tests => scalar @pods;
  };
  $reason = 'Test::Pod >= 1.41 required' if $@;
}

if ($reason) {
  load();
  plan(tests => scalar @pods);
}

for (@pods) {
  print "# checking $_\n";
  if ($reason) {
    skip("skip: $reason", 1);
  }
  else {
    pod_file_ok($_);
  }
}

