[EMAIL PROTECTED] wrote:
:> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
:> I had a go at integrating this into the core, but ran across some
:> test failures.
:>
:> First, the core version of t/pod/find.t is substantially different
:> from the one in the distribution. [...]
:Hmmm, never saw that one. Do I get it right that this is for
:TESTING Pod/* WITHIN the Perl core?
Integrating PodParser into the perl core involves taking the test
files from PodParser and putting them into t/pod in the core. When
you "make test" in your perl build directory, these tests are among
those executed.
:If so, the setting above
:in the *.t test script seems ok for me. The *.pm shouldn't
:contain such code.
:For the next update I can include sth. like
: if($ENV{PERL_CORE}) {
: @INC = (@INC, qw(../lib ../../../../../lib);
: }
:to t/pod/find.t - would that be ok?
I'm not convinced the ../../../../../lib should be there at all;
I can't conceive of any good reason why it is in there at the moment,
and the comment above it doesn't make it any clearer to me. But
please do take a look; it might make more sense in context to
someone closer to the PodParser code itself.
But adding an @INC modification to the version of t/pod/find.t in
the current PodParser distribution won't be enough to solve the
problem, since the tests in that file make assumptions about what
files exist to be found which are not valid when run within the
full perl distribution.
As I said, ideally the tests would be modified in such a way that
they can run in either context; ideally you would not need to use
$ENV{PERL_CORE} to distinguish, but it may be necessary for some
aspects.
:Are there other things that
:should be included in the distribution t/pod/find.t? I don't
:mind encapsulating all of them in if-PERL_CORE clauses.
:Maybe will have a look at the Perl core myself, if time permits.
Ideally use of PERL_CORE for tests should be kept to a minimum: as far
as possible we'd like to have the same things tested, in the same
way, whether running under the PodParser distribution or under the
perl distribution. But yes, please do have a look at the test file
currently in the perl distribution. (It is unchanged from the
version released in perl-5.8.0, which may be easier for you to
get hold of.)
:> The other test failures are in lib/Pod/t/*:
[...]
:> .. and I'm not sure whether we should just change the tests,
:> or whether
:> they have a right to expect the text they did.
:
:All of these are ok - the test references should be updated accordingly.
:This is because of the new perlpodspec: POD links like
:L<Pod::Find/"SYNOPSIS"> should be expanded to
: "SYNOPSIS" in Pod::Find
:as "in" is quite understandable in many (western) languages. The
:prior expansion adds too much english text.
Ok, I'll change these and integrate all but the find.t, and hope
that the issues with the latter can be resolved.
Hugo