From: Nicholas Clark Date: Sun, 13 Sep 2009 14:20:13 +0000 (+0100) Subject: Move Pod::Parser from lib (and t/pod) to ext. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6d1e6673d7386f4f9139111a6e44d555b8252741;p=p5sagit%2Fp5-mst-13.2.git Move Pod::Parser from lib (and t/pod) to ext. --- diff --git a/MANIFEST b/MANIFEST index b4b9ec8..795a6a4 100644 --- a/MANIFEST +++ b/MANIFEST @@ -2064,6 +2064,57 @@ ext/podlators/t/text.t podlators test ext/podlators/t/text-utf8.t podlators test ext/podlators/VERSION podlators custom Makefile.PL ext/podlators/VERSION podlators distribution version +ext/Pod-Parser/lib/Pod/Checker.pm Pod-Parser - check POD documents for syntax errors +ext/Pod-Parser/lib/Pod/Find.pm used by pod/splitpod +ext/Pod-Parser/lib/Pod/InputObjects.pm Pod-Parser - define objects for input streams +ext/Pod-Parser/lib/Pod/Parser.pm Pod-Parser - define base class for parsing POD +ext/Pod-Parser/lib/Pod/ParseUtils.pm Pod-Parser - pod utility functions +ext/Pod-Parser/lib/Pod/PlainText.pm Convert POD data to formatted ASCII text +ext/Pod-Parser/lib/Pod/Select.pm Pod-Parser - select portions of POD docs +ext/Pod-Parser/lib/Pod/Usage.pm Pod-Parser - print usage messages +ext/Pod-Parser/t/pod/contains_bad_pod.xr Pod-Parser test file +ext/Pod-Parser/t/pod/contains_pod.t Pod-Parser test +ext/Pod-Parser/t/pod/contains_pod.xr Pod-Parser test file +ext/Pod-Parser/t/pod/emptycmd.t Test empty pod directives +ext/Pod-Parser/t/pod/emptycmd.xr Expected results for emptycmd.t +ext/Pod-Parser/t/pod/find.t See if Pod::Find works +ext/Pod-Parser/t/pod/for.t Test =for directive +ext/Pod-Parser/t/pod/for.xr Expected results for for.t +ext/Pod-Parser/t/pod/headings.t Test =head directives +ext/Pod-Parser/t/pod/headings.xr Expected results for headings.t +ext/Pod-Parser/t/pod/included.t Test =include directive +ext/Pod-Parser/t/pod/included.xr Expected results for included.t +ext/Pod-Parser/t/pod/include.t Test =include directive +ext/Pod-Parser/t/pod/include.xr Expected results for include.t +ext/Pod-Parser/t/pod/lref.t Test L<...> sequences +ext/Pod-Parser/t/pod/lref.xr Expected results for lref.t +ext/Pod-Parser/t/pod/multiline_items.t Test multiline =items +ext/Pod-Parser/t/pod/multiline_items.xr Expected results for multiline_items.t +ext/Pod-Parser/t/pod/nested_items.t Test nested =items +ext/Pod-Parser/t/pod/nested_items.xr Expected results for nested_items.t +ext/Pod-Parser/t/pod/nested_seqs.t Test nested interior sequences +ext/Pod-Parser/t/pod/nested_seqs.xr Expected results for nested_seqs.t +ext/Pod-Parser/t/pod/oneline_cmds.t Test single paragraph ==cmds +ext/Pod-Parser/t/pod/oneline_cmds.xr Expected results for oneline_cmds.t +ext/Pod-Parser/t/pod/p2u_data.pl Test Pod::Usage +ext/Pod-Parser/t/pod/pod2usage2.t Test Pod::Usage +ext/Pod-Parser/t/pod/pod2usage.t Test Pod::Usage +ext/Pod-Parser/t/pod/pod2usage.xr Expected results for pod2usage.t +ext/Pod-Parser/t/pod/podchkenc.t Validate =encoding support +ext/Pod-Parser/t/pod/podchkenc.xr Expected results for the above +ext/Pod-Parser/t/pod/poderrs.t Test POD errors +ext/Pod-Parser/t/pod/poderrs.xr Expected results for poderrs.t +ext/Pod-Parser/t/pod/podselect.t Test Pod::Select +ext/Pod-Parser/t/pod/podselect.xr Expected results for podselect.t +ext/Pod-Parser/t/pod/special_seqs.t Test "special" interior sequences +ext/Pod-Parser/t/pod/special_seqs.xr Expected results for special_seqs.t +ext/Pod-Parser/t/pod/testcmp.pl Module to compare output against expected results +ext/Pod-Parser/t/pod/testp2pt.pl Module to test Pod::PlainText for a given file +ext/Pod-Parser/t/pod/testpchk.pl Module to test Pod::Checker for a given file +ext/Pod-Parser/t/pod/testpods/lib/Pod/Stuff.pm Sample data for t/pod/find.t +ext/Pod-Parser/t/pod/twice.t Test Pod::Parser +ext/Pod-Parser/t/pod/usage2.pod Test POD for pod2usage tests +ext/Pod-Parser/t/pod/usage.pod Test POD for pod2usage tests ext/Pod-Perldoc/lib/Pod/Perldoc/BaseTo.pm utility module for perldoc ext/Pod-Perldoc/lib/Pod/Perldoc/GetOptsOO.pm options parsing for perldoc ext/Pod-Perldoc/lib/Pod/Perldoc.pm guts of the 'perldoc' utility @@ -3259,16 +3310,8 @@ lib/perl5db/t/symbol-table-bug Tests for the Perl debugger lib/PerlIO.pm PerlIO support module lib/PerlIO/via/QuotedPrint.pm PerlIO::via::QuotedPrint lib/PerlIO/via/t/QuotedPrint.t PerlIO::via::QuotedPrint -lib/Pod/Checker.pm Pod-Parser - check POD documents for syntax errors -lib/Pod/Find.pm used by pod/splitpod lib/Pod/Functions.pm used by pod/splitpod lib/Pod/Html.pm Convert POD data to HTML -lib/Pod/InputObjects.pm Pod-Parser - define objects for input streams -lib/Pod/Parser.pm Pod-Parser - define base class for parsing POD -lib/Pod/ParseUtils.pm Pod-Parser - pod utility functions -lib/Pod/PlainText.pm Convert POD data to formatted ASCII text -lib/Pod/Select.pm Pod-Parser - select portions of POD docs -lib/Pod/t/contains_pod.t Pod-Parser test lib/Pod/t/eol.t end of line agnosticism lib/Pod/t/Functions.t See if Pod::Functions works lib/Pod/t/htmlescp.pod pod2html escape test input data @@ -3282,7 +3325,6 @@ lib/Pod/t/pod2html-lib.pl pod2html testing library lib/Pod/t/Select.t See if Pod::Select works lib/Pod/t/Usage.t See if Pod::Usage works lib/Pod/t/utils.t Test for Pod::ParseUtils -lib/Pod/Usage.pm Pod-Parser - print usage messages lib/pwd.pl Routines to keep track of PWD environment variable lib/Search/Dict.pm Perform binary search on dictionaries lib/Search/Dict.t See if Search::Dict works @@ -4115,8 +4157,6 @@ t/lib/Cname.pm Test charnames in regexes (op/pat.t) t/lib/common.pl Helper for lib/{warnings,feature}.t t/lib/commonsense.t See if configuration meets basic needs t/lib/compmod.pl Helper for 1_compile.t -t/lib/contains_bad_pod.xr Pod-Parser test file -t/lib/contains_pod.xr Pod-Parser test file t/lib/croak.t Test calls to Perl_croak() in the C source. t/lib/cygwin.t Builtin cygwin function tests t/lib/deprecate/Deprecated.pm Deprecated module to test deprecate.pm @@ -4383,46 +4423,6 @@ t/op/write.t See if write works (formats work) t/op/yadayada.t See if ..., !!! and ??? work t/perl.supp Perl valgrind suppressions t/pod/diag.t Test completeness of perldiag.pod -t/pod/emptycmd.t Test empty pod directives -t/pod/emptycmd.xr Expected results for emptycmd.t -t/pod/find.t See if Pod::Find works -t/pod/for.t Test =for directive -t/pod/for.xr Expected results for for.t -t/pod/headings.t Test =head directives -t/pod/headings.xr Expected results for headings.t -t/pod/included.t Test =include directive -t/pod/included.xr Expected results for included.t -t/pod/include.t Test =include directive -t/pod/include.xr Expected results for include.t -t/pod/lref.t Test L<...> sequences -t/pod/lref.xr Expected results for lref.t -t/pod/multiline_items.t Test multiline =items -t/pod/multiline_items.xr Expected results for multiline_items.t -t/pod/nested_items.t Test nested =items -t/pod/nested_items.xr Expected results for nested_items.t -t/pod/nested_seqs.t Test nested interior sequences -t/pod/nested_seqs.xr Expected results for nested_seqs.t -t/pod/oneline_cmds.t Test single paragraph ==cmds -t/pod/oneline_cmds.xr Expected results for oneline_cmds.t -t/pod/p2u_data.pl Test Pod::Usage -t/pod/pod2usage2.t Test Pod::Usage -t/pod/pod2usage.t Test Pod::Usage -t/pod/pod2usage.xr Expected results for pod2usage.t -t/pod/podchkenc.t Validate =encoding support -t/pod/podchkenc.xr Expected results for the above -t/pod/poderrs.t Test POD errors -t/pod/poderrs.xr Expected results for poderrs.t -t/pod/podselect.t Test Pod::Select -t/pod/podselect.xr Expected results for podselect.t -t/pod/special_seqs.t Test "special" interior sequences -t/pod/special_seqs.xr Expected results for special_seqs.t -t/pod/testcmp.pl Module to compare output against expected results -t/pod/testp2pt.pl Module to test Pod::PlainText for a given file -t/pod/testpchk.pl Module to test Pod::Checker for a given file -t/pod/testpods/lib/Pod/Stuff.pm Sample data for t/pod/find.t -t/pod/twice.t Test Pod::Parser -t/pod/usage2.pod Test POD for pod2usage tests -t/pod/usage.pod Test POD for pod2usage tests t/porting/checkcase.t Check whether we are case-insensitive-fs-friendly t/README Instructions for regression tests t/re/pat.t See if esoteric patterns work diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 6cf67ad..a16ddb0 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -1278,46 +1278,11 @@ use File::Glob qw(:case); # version 1.37! 'DISTRIBUTION' => 'MAREKR/Pod-Parser-1.38.tar.gz', - 'FILES' => q[lib/Pod/{Checker,Find,InputObjects,Parser,ParseUtils,PlainText,Select,Usage}.pm - lib/Pod/t/contains_pod.t + 'FILES' => q[ext/Pod-Parser pod/pod{2usage,checker,select}.PL - t/lib/contains_bad_pod.xr - t/lib/contains_pod.xr - t/pod/emptycmd.* - t/pod/find.t - t/pod/for.* - t/pod/headings.* - t/pod/include.* - t/pod/included.* - t/pod/lref.* - t/pod/multiline_items.* - t/pod/nested_items.* - t/pod/nested_seqs.* - t/pod/oneline_cmds.* - t/pod/p2u_data.pl - t/pod/pod2usage.* - t/pod/pod2usage2.t - t/pod/podchkenc.* - t/pod/poderrs.* - t/pod/podselect.* - t/pod/special_seqs.* - t/pod/testcmp.pl - t/pod/testp2pt.pl - t/pod/testpchk.pl - t/pod/testpods/ - t/pod/twice.t - t/pod/usage*.pod ], - 'MAP' => { 't/pod/' => 't/pod/', + 'MAP' => { '' => 'ext/Pod-Parser/', 'scripts/' => 'pod/', - 't/pod/contains_pod.t' - => 'lib/Pod/t/contains_pod.t', - # XXX these two dislocations have required - # t/pod/contains_pod.t to be edited to match - - 't/pod/contains_pod.xr' => 't/lib/contains_pod.xr', - 't/pod/contains_bad_pod.xr' - => 't/lib/contains_bad_pod.xr', }, 'CPAN' => 1, 'UPSTREAM' => undef, diff --git a/ext/.gitignore b/ext/.gitignore index d53dcce..aaeccce 100644 --- a/ext/.gitignore +++ b/ext/.gitignore @@ -75,6 +75,7 @@ ppport.h /PerlIO-via/Makefile.PL /Pod-Escapes/Makefile.PL /Pod-LaTeX/Makefile.PL +/Pod-Parser/Makefile.PL /Pod-Perldoc/Makefile.PL /Pod-Plainer/Makefile.PL /Pod-Simple/Makefile.PL diff --git a/lib/Pod/Checker.pm b/ext/Pod-Parser/lib/Pod/Checker.pm similarity index 100% rename from lib/Pod/Checker.pm rename to ext/Pod-Parser/lib/Pod/Checker.pm diff --git a/lib/Pod/Find.pm b/ext/Pod-Parser/lib/Pod/Find.pm similarity index 100% rename from lib/Pod/Find.pm rename to ext/Pod-Parser/lib/Pod/Find.pm diff --git a/lib/Pod/InputObjects.pm b/ext/Pod-Parser/lib/Pod/InputObjects.pm similarity index 100% rename from lib/Pod/InputObjects.pm rename to ext/Pod-Parser/lib/Pod/InputObjects.pm diff --git a/lib/Pod/ParseUtils.pm b/ext/Pod-Parser/lib/Pod/ParseUtils.pm similarity index 100% rename from lib/Pod/ParseUtils.pm rename to ext/Pod-Parser/lib/Pod/ParseUtils.pm diff --git a/lib/Pod/Parser.pm b/ext/Pod-Parser/lib/Pod/Parser.pm similarity index 100% rename from lib/Pod/Parser.pm rename to ext/Pod-Parser/lib/Pod/Parser.pm diff --git a/lib/Pod/PlainText.pm b/ext/Pod-Parser/lib/Pod/PlainText.pm similarity index 100% rename from lib/Pod/PlainText.pm rename to ext/Pod-Parser/lib/Pod/PlainText.pm diff --git a/lib/Pod/Select.pm b/ext/Pod-Parser/lib/Pod/Select.pm similarity index 100% rename from lib/Pod/Select.pm rename to ext/Pod-Parser/lib/Pod/Select.pm diff --git a/lib/Pod/Usage.pm b/ext/Pod-Parser/lib/Pod/Usage.pm similarity index 100% rename from lib/Pod/Usage.pm rename to ext/Pod-Parser/lib/Pod/Usage.pm diff --git a/t/lib/contains_bad_pod.xr b/ext/Pod-Parser/t/pod/contains_bad_pod.xr similarity index 100% rename from t/lib/contains_bad_pod.xr rename to ext/Pod-Parser/t/pod/contains_bad_pod.xr diff --git a/ext/Pod-Parser/t/pod/contains_pod.t b/ext/Pod-Parser/t/pod/contains_pod.t new file mode 100644 index 0000000..6326e72 --- /dev/null +++ b/ext/Pod-Parser/t/pod/contains_pod.t @@ -0,0 +1,19 @@ +#!/usr/bin/env perl + +# Copyright (C) 2005 Joshua Hoblitt +# +# $Id$ + +use strict; + +use Test::More tests => 2; + +use Pod::Find qw( contains_pod ); + +{ + ok(contains_pod('t/pod/contains_pod.xr'), "contains pod"); +} + +{ + ok(contains_pod('t/pod/contains_bad_pod.xr'), "contains bad pod"); +} diff --git a/t/lib/contains_pod.xr b/ext/Pod-Parser/t/pod/contains_pod.xr similarity index 100% rename from t/lib/contains_pod.xr rename to ext/Pod-Parser/t/pod/contains_pod.xr diff --git a/t/pod/emptycmd.t b/ext/Pod-Parser/t/pod/emptycmd.t similarity index 100% rename from t/pod/emptycmd.t rename to ext/Pod-Parser/t/pod/emptycmd.t diff --git a/t/pod/emptycmd.xr b/ext/Pod-Parser/t/pod/emptycmd.xr similarity index 100% rename from t/pod/emptycmd.xr rename to ext/Pod-Parser/t/pod/emptycmd.xr diff --git a/t/pod/find.t b/ext/Pod-Parser/t/pod/find.t similarity index 79% rename from t/pod/find.t rename to ext/Pod-Parser/t/pod/find.t index bfd66cd..f6272d8 100644 --- a/t/pod/find.t +++ b/ext/Pod-Parser/t/pod/find.t @@ -1,17 +1,6 @@ # Testing of Pod::Find # Author: Marek Rouchal -BEGIN { - if($ENV{PERL_CORE}) { - chdir 't' if -d 't'; - # The ../../../../../lib is for finding lib/utf8.pm - # when running under all-utf8 settings (pod/find.t) - # does not directly require lib/utf8.pm but regular - # expressions will need that. - @INC = qw(../lib ../../../../../lib); - } -} - $| = 1; use Test::More tests => 4; @@ -26,18 +15,14 @@ use File::Spec; require Cwd; my $THISDIR = Cwd::cwd(); my $VERBOSE = $ENV{PERL_CORE} ? 0 : ($ENV{TEST_VERBOSE} || 0); -my $lib_dir = $ENV{PERL_CORE} ? - File::Spec->catdir('pod', 'testpods', 'lib') - : File::Spec->catdir($THISDIR,'lib'); +my $lib_dir = File::Spec->catdir($THISDIR,'lib'); my $vms_unix_rpt = 0; my $vms_efs = 0; my $unix_mode = 1; if ($^O eq 'VMS') { - $lib_dir = $ENV{PERL_CORE} ? - VMS::Filespec::unixify(File::Spec->catdir('pod', 'testpods', 'lib')) - : VMS::Filespec::unixify(File::Spec->catdir($THISDIR,'-','lib','pod')); + $lib_dir = VMS::Filespec::unixify(File::Spec->catdir($THISDIR,'-','lib','pod')); $Qlib_dir = $lib_dir; $Qlib_dir =~ s#\/#::#g; @@ -60,11 +45,7 @@ print "### 2. searching $lib_dir\n"; my %pods = pod_find($lib_dir); my $result = join(',', sort values %pods); print "### found $result\n"; -my $compare = $ENV{PERL_CORE} ? - join(',', sort qw( - Pod::Stuff -)) - : join(',', sort qw( +my $compare = join(',', sort qw( Pod::Checker Pod::Find Pod::InputObjects @@ -114,7 +95,7 @@ if ($^O eq 'VMS') { # privlib is perl_root:[lib] OK but not under mms } else { $compare = $ENV{PERL_CORE} ? - File::Spec->catfile(File::Spec->updir, 'lib','File','Find.pm') + File::Spec->catfile(File::Spec->updir, File::Spec->updir, 'lib','File','Find.pm') : File::Spec->catfile($Config::Config{privlibexp},"File","Find.pm"); my $resfile = _canon($result); my $cmpfile = _canon($compare); @@ -133,15 +114,13 @@ else { my $searchpod = 'Stuff'; print "### 4. searching for $searchpod.pod\n"; $result = pod_where( - { -dirs => [ File::Spec->catdir( - $ENV{PERL_CORE} ? () : qw(t), 'pod', 'testpods', 'lib', 'Pod') ], + { -dirs => [ File::Spec->catdir( qw(t), 'pod', 'testpods', 'lib', 'Pod') ], -verbose => $VERBOSE }, $searchpod) || "undef - $searchpod.pod not found!"; print "### found $result\n"; $compare = File::Spec->catfile( - $ENV{PERL_CORE} ? () : qw(t), - 'pod', 'testpods', 'lib', 'Pod' ,'Stuff.pm'); + qw(t), 'pod', 'testpods', 'lib', 'Pod' ,'Stuff.pm'); is(_canon($result),_canon($compare)); diff --git a/t/pod/for.t b/ext/Pod-Parser/t/pod/for.t similarity index 100% rename from t/pod/for.t rename to ext/Pod-Parser/t/pod/for.t diff --git a/t/pod/for.xr b/ext/Pod-Parser/t/pod/for.xr similarity index 100% rename from t/pod/for.xr rename to ext/Pod-Parser/t/pod/for.xr diff --git a/t/pod/headings.t b/ext/Pod-Parser/t/pod/headings.t similarity index 100% rename from t/pod/headings.t rename to ext/Pod-Parser/t/pod/headings.t diff --git a/t/pod/headings.xr b/ext/Pod-Parser/t/pod/headings.xr similarity index 100% rename from t/pod/headings.xr rename to ext/Pod-Parser/t/pod/headings.xr diff --git a/t/pod/include.t b/ext/Pod-Parser/t/pod/include.t similarity index 100% rename from t/pod/include.t rename to ext/Pod-Parser/t/pod/include.t diff --git a/t/pod/include.xr b/ext/Pod-Parser/t/pod/include.xr similarity index 100% rename from t/pod/include.xr rename to ext/Pod-Parser/t/pod/include.xr diff --git a/t/pod/included.t b/ext/Pod-Parser/t/pod/included.t similarity index 100% rename from t/pod/included.t rename to ext/Pod-Parser/t/pod/included.t diff --git a/t/pod/included.xr b/ext/Pod-Parser/t/pod/included.xr similarity index 100% rename from t/pod/included.xr rename to ext/Pod-Parser/t/pod/included.xr diff --git a/t/pod/lref.t b/ext/Pod-Parser/t/pod/lref.t similarity index 100% rename from t/pod/lref.t rename to ext/Pod-Parser/t/pod/lref.t diff --git a/t/pod/lref.xr b/ext/Pod-Parser/t/pod/lref.xr similarity index 100% rename from t/pod/lref.xr rename to ext/Pod-Parser/t/pod/lref.xr diff --git a/t/pod/multiline_items.t b/ext/Pod-Parser/t/pod/multiline_items.t similarity index 100% rename from t/pod/multiline_items.t rename to ext/Pod-Parser/t/pod/multiline_items.t diff --git a/t/pod/multiline_items.xr b/ext/Pod-Parser/t/pod/multiline_items.xr similarity index 100% rename from t/pod/multiline_items.xr rename to ext/Pod-Parser/t/pod/multiline_items.xr diff --git a/t/pod/nested_items.t b/ext/Pod-Parser/t/pod/nested_items.t similarity index 100% rename from t/pod/nested_items.t rename to ext/Pod-Parser/t/pod/nested_items.t diff --git a/t/pod/nested_items.xr b/ext/Pod-Parser/t/pod/nested_items.xr similarity index 100% rename from t/pod/nested_items.xr rename to ext/Pod-Parser/t/pod/nested_items.xr diff --git a/t/pod/nested_seqs.t b/ext/Pod-Parser/t/pod/nested_seqs.t similarity index 100% rename from t/pod/nested_seqs.t rename to ext/Pod-Parser/t/pod/nested_seqs.t diff --git a/t/pod/nested_seqs.xr b/ext/Pod-Parser/t/pod/nested_seqs.xr similarity index 100% rename from t/pod/nested_seqs.xr rename to ext/Pod-Parser/t/pod/nested_seqs.xr diff --git a/t/pod/oneline_cmds.t b/ext/Pod-Parser/t/pod/oneline_cmds.t similarity index 100% rename from t/pod/oneline_cmds.t rename to ext/Pod-Parser/t/pod/oneline_cmds.t diff --git a/t/pod/oneline_cmds.xr b/ext/Pod-Parser/t/pod/oneline_cmds.xr similarity index 100% rename from t/pod/oneline_cmds.xr rename to ext/Pod-Parser/t/pod/oneline_cmds.xr diff --git a/t/pod/p2u_data.pl b/ext/Pod-Parser/t/pod/p2u_data.pl similarity index 100% rename from t/pod/p2u_data.pl rename to ext/Pod-Parser/t/pod/p2u_data.pl diff --git a/t/pod/pod2usage.t b/ext/Pod-Parser/t/pod/pod2usage.t similarity index 100% rename from t/pod/pod2usage.t rename to ext/Pod-Parser/t/pod/pod2usage.t diff --git a/t/pod/pod2usage.xr b/ext/Pod-Parser/t/pod/pod2usage.xr similarity index 100% rename from t/pod/pod2usage.xr rename to ext/Pod-Parser/t/pod/pod2usage.xr diff --git a/t/pod/pod2usage2.t b/ext/Pod-Parser/t/pod/pod2usage2.t similarity index 92% rename from t/pod/pod2usage2.t rename to ext/Pod-Parser/t/pod/pod2usage2.t index def8bea..80678a0 100644 --- a/t/pod/pod2usage2.t +++ b/ext/Pod-Parser/t/pod/pod2usage2.t @@ -151,20 +151,16 @@ ok (compare ($text, <<'EOT'), "Output test pod2usage (-verbose => 99, -sections EOT # does the __DATA__ work ok as input -my ($blib, $test_script, $pod_file1, , $pod_file2); -if ($ENV{PERL_CORE}) { - $blib = '-I../lib'; - $test_script = File::Spec->catfile(qw(pod p2u_data.pl)); - $pod_file1 = File::Spec->catfile(qw(pod usage.pod)); - $pod_file2 = File::Spec->catfile(qw(pod usage2.pod)); -} else { - $blib = '-Mblib'; - $test_script = File::Spec->catfile(qw(t pod p2u_data.pl)); - $pod_file1 = File::Spec->catfile(qw(t pod usage.pod)); - $pod_file2 = File::Spec->catfile(qw(t pod usage2.pod)); +my (@blib, $test_script, $pod_file1, , $pod_file2); +if (!$ENV{PERL_CORE}) { + @blib = '-Mblib'; } +$test_script = File::Spec->catfile(qw(t pod p2u_data.pl)); +$pod_file1 = File::Spec->catfile(qw(t pod usage.pod)); +$pod_file2 = File::Spec->catfile(qw(t pod usage2.pod)); -($exit, $text) = getoutput( sub { system($^X, $blib, $test_script); exit($? >> 8); } ); + +($exit, $text) = getoutput( sub { system($^X, @blib, $test_script); exit($? >> 8); } ); $text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR is ($exit, 17, "Exit status pod2usage (-verbose => 2, -input => \*DATA)"); ok (compare ($text, <<'EOT'), "Output test pod2usage (-verbose => 2, -input => \*DATA)") or diag "Got:\n$text\n"; @@ -223,13 +219,8 @@ EOT # test with pod_where use_ok('Pod::Find', qw(pod_where)); -+# Exclude current dir when testing in CORE; otherwise on case-insensitive -+# systems, when in t/ we find pod/usage.pod rather than # ../lib/Pod/Usage.pm -+my @NO_CURDIR = ($ENV{PERL_CORE}) - ? ('-dirs' => []) - : (); -($exit, $text) = getoutput( sub { pod2usage( -input => pod_where({-inc => 1, @NO_CURDIR}, 'Pod::Usage'), +($exit, $text) = getoutput( sub { pod2usage( -input => pod_where({-inc => 1}, 'Pod::Usage'), -exitval => 0, -verbose => 0) } ); $text =~ s{#Using.*/blib.*\n}{}; # older blib's emit something to STDERR is ($exit, 0, "Exit status pod2usage with Pod::Find"); diff --git a/t/pod/podchkenc.t b/ext/Pod-Parser/t/pod/podchkenc.t similarity index 100% rename from t/pod/podchkenc.t rename to ext/Pod-Parser/t/pod/podchkenc.t diff --git a/t/pod/podchkenc.xr b/ext/Pod-Parser/t/pod/podchkenc.xr similarity index 100% rename from t/pod/podchkenc.xr rename to ext/Pod-Parser/t/pod/podchkenc.xr diff --git a/t/pod/poderrs.t b/ext/Pod-Parser/t/pod/poderrs.t similarity index 100% rename from t/pod/poderrs.t rename to ext/Pod-Parser/t/pod/poderrs.t diff --git a/t/pod/poderrs.xr b/ext/Pod-Parser/t/pod/poderrs.xr similarity index 100% rename from t/pod/poderrs.xr rename to ext/Pod-Parser/t/pod/poderrs.xr diff --git a/t/pod/podselect.t b/ext/Pod-Parser/t/pod/podselect.t similarity index 100% rename from t/pod/podselect.t rename to ext/Pod-Parser/t/pod/podselect.t diff --git a/t/pod/podselect.xr b/ext/Pod-Parser/t/pod/podselect.xr similarity index 100% rename from t/pod/podselect.xr rename to ext/Pod-Parser/t/pod/podselect.xr diff --git a/t/pod/special_seqs.t b/ext/Pod-Parser/t/pod/special_seqs.t similarity index 100% rename from t/pod/special_seqs.t rename to ext/Pod-Parser/t/pod/special_seqs.t diff --git a/t/pod/special_seqs.xr b/ext/Pod-Parser/t/pod/special_seqs.xr similarity index 100% rename from t/pod/special_seqs.xr rename to ext/Pod-Parser/t/pod/special_seqs.xr diff --git a/t/pod/testcmp.pl b/ext/Pod-Parser/t/pod/testcmp.pl similarity index 100% rename from t/pod/testcmp.pl rename to ext/Pod-Parser/t/pod/testcmp.pl diff --git a/t/pod/testp2pt.pl b/ext/Pod-Parser/t/pod/testp2pt.pl similarity index 95% rename from t/pod/testp2pt.pl rename to ext/Pod-Parser/t/pod/testp2pt.pl index bec55e4..308cd1c 100644 --- a/t/pod/testp2pt.pl +++ b/ext/Pod-Parser/t/pod/testp2pt.pl @@ -38,7 +38,9 @@ sub catfile(@) { File::Spec->catfile(@_); } my $INSTDIR = abs_path(dirname $0); $INSTDIR = VMS::Filespec::unixpath($INSTDIR) if $^O eq 'VMS'; $INSTDIR =~ s#/$## if $^O eq 'VMS'; +$INSTDIR =~ s#:$## if $^O eq 'MacOS'; $INSTDIR = (dirname $INSTDIR) if (basename($INSTDIR) eq 'pod'); +$INSTDIR =~ s#:$## if $^O eq 'MacOS'; $INSTDIR = (dirname $INSTDIR) if (basename($INSTDIR) eq 't'); my @PODINCDIRS = ( catfile($INSTDIR, 'lib', 'Pod'), catfile($INSTDIR, 'scripts'), @@ -46,6 +48,10 @@ my @PODINCDIRS = ( catfile($INSTDIR, 'lib', 'Pod'), catfile($INSTDIR, 't', 'pod') ); +# FIXME - we should make the core capable of finding utilities built in +# locations in ext. +push @PODINCDIRS, catfile((File::Spec->updir()) x 2, 'pod') if $ENV{PERL_CORE}; + ## Find the path to the file to =include sub findinclude { my $self = shift; diff --git a/t/pod/testpchk.pl b/ext/Pod-Parser/t/pod/testpchk.pl similarity index 100% rename from t/pod/testpchk.pl rename to ext/Pod-Parser/t/pod/testpchk.pl diff --git a/t/pod/testpods/lib/Pod/Stuff.pm b/ext/Pod-Parser/t/pod/testpods/lib/Pod/Stuff.pm similarity index 100% rename from t/pod/testpods/lib/Pod/Stuff.pm rename to ext/Pod-Parser/t/pod/testpods/lib/Pod/Stuff.pm diff --git a/t/pod/twice.t b/ext/Pod-Parser/t/pod/twice.t similarity index 100% rename from t/pod/twice.t rename to ext/Pod-Parser/t/pod/twice.t diff --git a/t/pod/usage.pod b/ext/Pod-Parser/t/pod/usage.pod similarity index 100% rename from t/pod/usage.pod rename to ext/Pod-Parser/t/pod/usage.pod diff --git a/t/pod/usage2.pod b/ext/Pod-Parser/t/pod/usage2.pod similarity index 100% rename from t/pod/usage2.pod rename to ext/Pod-Parser/t/pod/usage2.pod diff --git a/lib/.gitignore b/lib/.gitignore index e052e57..154b8e3 100644 --- a/lib/.gitignore +++ b/lib/.gitignore @@ -290,16 +290,24 @@ /Parse/CPAN/Meta.pm /POSIX.pm /POSIX.pod +/Pod/Checker.pm /Pod/Escapes.pm +/Pod/Find.pm +/Pod/InputObjects.pm /Pod/LaTeX.pm /Pod/Man.pm /Pod/ParseLink.pm +/Pod/ParseUtils.pm +/Pod/Parser.pm /Pod/Perldoc.pm /Pod/Perldoc /Pod/Plainer.pm +/Pod/PlainText.pm +/Pod/Select.pm /Pod/Simple.pm /Pod/Simple.pod /Pod/Simple +/Pod/Usage.pm /PerlIO/encoding.pm /PerlIO/scalar.pm /PerlIO/via.pm diff --git a/lib/Pod/t/contains_pod.t b/lib/Pod/t/contains_pod.t deleted file mode 100644 index 25cce53..0000000 --- a/lib/Pod/t/contains_pod.t +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env perl - -# Copyright (C) 2005 Joshua Hoblitt -# -# $Id$ - -use strict; -BEGIN { - if( $ENV{PERL_CORE} ) { - chdir 't'; - @INC = '../lib'; - } else { - use lib qw( ./lib ); - } -} - -use Test::More tests => 2; - -use Pod::Find qw( contains_pod ); - -{ - ok(contains_pod('lib/contains_pod.xr'), "contains pod"); -} - -{ - ok(contains_pod('lib/contains_bad_pod.xr'), "contains bad pod"); -} diff --git a/t/TEST b/t/TEST index 36a520a..30836f3 100755 --- a/t/TEST +++ b/t/TEST @@ -23,6 +23,12 @@ my %dir_to_switch = '../ext/File-Glob/t' => '-I.. -MTestInit', # FIXME - tests assume t/ ); +# I think in the end I'd like "not absolute" to be the default", as it saves +# some fakery within TestInit which can peturb tests, and takes CPU. +my %no_abs = + ('../ext/Pod-Parser' => 1, + ); + my %temp_no_core = ('../ext/B-Debug' => 1, '../ext/Compress-Raw-Bzip2' => 1, @@ -189,7 +195,10 @@ sub _scan_test { $return_dir = '../../t'; $lib = '../../lib'; $perl = '../../t/perl'; - $testswitch = "-I../.. -MTestInit=U2T,A"; + $testswitch = "-I../.. -MTestInit=U2T"; + if (!$no_abs{$run_dir}) { + $testswitch = $testswitch . ',A'; + } if ($temp_no_core{$run_dir}) { $testswitch = $testswitch . ',NC'; }