Move Pod::Parser from lib (and t/pod) to ext.
Nicholas Clark [Sun, 13 Sep 2009 14:20:13 +0000 (15:20 +0100)]
57 files changed:
MANIFEST
Porting/Maintainers.pl
ext/.gitignore
ext/Pod-Parser/lib/Pod/Checker.pm [moved from lib/Pod/Checker.pm with 100% similarity]
ext/Pod-Parser/lib/Pod/Find.pm [moved from lib/Pod/Find.pm with 100% similarity]
ext/Pod-Parser/lib/Pod/InputObjects.pm [moved from lib/Pod/InputObjects.pm with 100% similarity]
ext/Pod-Parser/lib/Pod/ParseUtils.pm [moved from lib/Pod/ParseUtils.pm with 100% similarity]
ext/Pod-Parser/lib/Pod/Parser.pm [moved from lib/Pod/Parser.pm with 100% similarity]
ext/Pod-Parser/lib/Pod/PlainText.pm [moved from lib/Pod/PlainText.pm with 100% similarity]
ext/Pod-Parser/lib/Pod/Select.pm [moved from lib/Pod/Select.pm with 100% similarity]
ext/Pod-Parser/lib/Pod/Usage.pm [moved from lib/Pod/Usage.pm with 100% similarity]
ext/Pod-Parser/t/pod/contains_bad_pod.xr [moved from t/lib/contains_bad_pod.xr with 100% similarity]
ext/Pod-Parser/t/pod/contains_pod.t [new file with mode: 0644]
ext/Pod-Parser/t/pod/contains_pod.xr [moved from t/lib/contains_pod.xr with 100% similarity]
ext/Pod-Parser/t/pod/emptycmd.t [moved from t/pod/emptycmd.t with 100% similarity]
ext/Pod-Parser/t/pod/emptycmd.xr [moved from t/pod/emptycmd.xr with 100% similarity]
ext/Pod-Parser/t/pod/find.t [moved from t/pod/find.t with 79% similarity]
ext/Pod-Parser/t/pod/for.t [moved from t/pod/for.t with 100% similarity]
ext/Pod-Parser/t/pod/for.xr [moved from t/pod/for.xr with 100% similarity]
ext/Pod-Parser/t/pod/headings.t [moved from t/pod/headings.t with 100% similarity]
ext/Pod-Parser/t/pod/headings.xr [moved from t/pod/headings.xr with 100% similarity]
ext/Pod-Parser/t/pod/include.t [moved from t/pod/include.t with 100% similarity]
ext/Pod-Parser/t/pod/include.xr [moved from t/pod/include.xr with 100% similarity]
ext/Pod-Parser/t/pod/included.t [moved from t/pod/included.t with 100% similarity]
ext/Pod-Parser/t/pod/included.xr [moved from t/pod/included.xr with 100% similarity]
ext/Pod-Parser/t/pod/lref.t [moved from t/pod/lref.t with 100% similarity]
ext/Pod-Parser/t/pod/lref.xr [moved from t/pod/lref.xr with 100% similarity]
ext/Pod-Parser/t/pod/multiline_items.t [moved from t/pod/multiline_items.t with 100% similarity]
ext/Pod-Parser/t/pod/multiline_items.xr [moved from t/pod/multiline_items.xr with 100% similarity]
ext/Pod-Parser/t/pod/nested_items.t [moved from t/pod/nested_items.t with 100% similarity]
ext/Pod-Parser/t/pod/nested_items.xr [moved from t/pod/nested_items.xr with 100% similarity]
ext/Pod-Parser/t/pod/nested_seqs.t [moved from t/pod/nested_seqs.t with 100% similarity]
ext/Pod-Parser/t/pod/nested_seqs.xr [moved from t/pod/nested_seqs.xr with 100% similarity]
ext/Pod-Parser/t/pod/oneline_cmds.t [moved from t/pod/oneline_cmds.t with 100% similarity]
ext/Pod-Parser/t/pod/oneline_cmds.xr [moved from t/pod/oneline_cmds.xr with 100% similarity]
ext/Pod-Parser/t/pod/p2u_data.pl [moved from t/pod/p2u_data.pl with 100% similarity]
ext/Pod-Parser/t/pod/pod2usage.t [moved from t/pod/pod2usage.t with 100% similarity]
ext/Pod-Parser/t/pod/pod2usage.xr [moved from t/pod/pod2usage.xr with 100% similarity]
ext/Pod-Parser/t/pod/pod2usage2.t [moved from t/pod/pod2usage2.t with 92% similarity]
ext/Pod-Parser/t/pod/podchkenc.t [moved from t/pod/podchkenc.t with 100% similarity]
ext/Pod-Parser/t/pod/podchkenc.xr [moved from t/pod/podchkenc.xr with 100% similarity]
ext/Pod-Parser/t/pod/poderrs.t [moved from t/pod/poderrs.t with 100% similarity]
ext/Pod-Parser/t/pod/poderrs.xr [moved from t/pod/poderrs.xr with 100% similarity]
ext/Pod-Parser/t/pod/podselect.t [moved from t/pod/podselect.t with 100% similarity]
ext/Pod-Parser/t/pod/podselect.xr [moved from t/pod/podselect.xr with 100% similarity]
ext/Pod-Parser/t/pod/special_seqs.t [moved from t/pod/special_seqs.t with 100% similarity]
ext/Pod-Parser/t/pod/special_seqs.xr [moved from t/pod/special_seqs.xr with 100% similarity]
ext/Pod-Parser/t/pod/testcmp.pl [moved from t/pod/testcmp.pl with 100% similarity]
ext/Pod-Parser/t/pod/testp2pt.pl [moved from t/pod/testp2pt.pl with 95% similarity]
ext/Pod-Parser/t/pod/testpchk.pl [moved from t/pod/testpchk.pl with 100% similarity]
ext/Pod-Parser/t/pod/testpods/lib/Pod/Stuff.pm [moved from t/pod/testpods/lib/Pod/Stuff.pm with 100% similarity]
ext/Pod-Parser/t/pod/twice.t [moved from t/pod/twice.t with 100% similarity]
ext/Pod-Parser/t/pod/usage.pod [moved from t/pod/usage.pod with 100% similarity]
ext/Pod-Parser/t/pod/usage2.pod [moved from t/pod/usage2.pod with 100% similarity]
lib/.gitignore
lib/Pod/t/contains_pod.t [deleted file]
t/TEST

index b4b9ec8..795a6a4 100644 (file)
--- 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
index 6cf67ad..a16ddb0 100755 (executable)
@@ -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,
index d53dcce..aaeccce 100644 (file)
@@ -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/ext/Pod-Parser/t/pod/contains_pod.t b/ext/Pod-Parser/t/pod/contains_pod.t
new file mode 100644 (file)
index 0000000..6326e72
--- /dev/null
@@ -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");
+}
similarity index 79%
rename from t/pod/find.t
rename to ext/Pod-Parser/t/pod/find.t
index bfd66cd..f6272d8 100644 (file)
@@ -1,17 +1,6 @@
 # Testing of Pod::Find
 # Author: Marek Rouchal <marek@saftsack.fs.uni-bayreuth.de>
 
-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));
 
 
similarity index 100%
rename from t/pod/for.t
rename to ext/Pod-Parser/t/pod/for.t
similarity index 100%
rename from t/pod/for.xr
rename to ext/Pod-Parser/t/pod/for.xr
similarity index 100%
rename from t/pod/lref.t
rename to ext/Pod-Parser/t/pod/lref.t
similarity index 100%
rename from t/pod/lref.xr
rename to ext/Pod-Parser/t/pod/lref.xr
similarity index 92%
rename from t/pod/pod2usage2.t
rename to ext/Pod-Parser/t/pod/pod2usage2.t
index def8bea..80678a0 100644 (file)
@@ -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");
similarity index 95%
rename from t/pod/testp2pt.pl
rename to ext/Pod-Parser/t/pod/testp2pt.pl
index bec55e4..308cd1c 100644 (file)
@@ -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;
similarity index 100%
rename from t/pod/twice.t
rename to ext/Pod-Parser/t/pod/twice.t
index e052e57..154b8e3 100644 (file)
 /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 (file)
index 25cce53..0000000
+++ /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 (executable)
--- 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';
            }