1use Test::More; 2eval "use Test::Pod 1.00"; 3plan skip_all => "Test::Pod 1.00 required for testing POD" if $@; 4 5##################################################################### 6# WARNING: INSANE BLACK MAGIC 7##################################################################### 8 9# Hack Pod::Simple::BlackBox to ignore the Test::Inline "=begin has more than one word errors" 10my $begin = \&Pod::Simple::BlackBox::_ponder_begin; 11sub mybegin { 12 my $para = $_[1]; 13 my $content = join ' ', splice @$para, 2; 14 $content =~ s/^\s+//s; 15 $content =~ s/\s+$//s; 16 my @words = split /\s+/, $content; 17 if ( $words[0] =~ /^test(?:ing)?\z/s ) { 18 foreach ( 2 .. $#$para ) { 19 $para->[$_] = ''; 20 } 21 $para->[2] = $words[0]; 22 } 23 24 # Continue as normal 25 push @$para, @words; 26 return &$begin(@_); 27} 28 29local $^W = 0; 30*Pod::Simple::BlackBox::_ponder_begin = \&mybegin; 31 32##################################################################### 33# END BLACK MAGIC 34##################################################################### 35 36all_pod_files_ok(); 37