This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
In pod/buildtoc, chdir to the top level of the source tree before running.
authorNicholas Clark <nick@ccl4.org>
Mon, 7 Nov 2011 12:03:09 +0000 (13:03 +0100)
committerNicholas Clark <nick@ccl4.org>
Fri, 18 Nov 2011 10:08:55 +0000 (11:08 +0100)
commitccbc72835d4d55430db838ce5b46680f5d9966bc
tree0d286dcd3b1ed58681d2de4c791fa687fe3f94e0
parentce066323ce88fe6eb1c3b6b47c227f9b03ca1cef
In pod/buildtoc, chdir to the top level of the source tree before running.

Originally buildtoc called chdir to ensure it ran from the pod/ directory.
However, this caused problems when the environment is set to honour UTF-8
locales, and the regex engine (attempts to) demand-load UTF-8 swashes,
because on *nix and VMS buildtoc is invoked with a relative path in @INC.
d5e2eea989a69524 fixed this by avoiding the chdir.

However, an equally valid solution is to run from the top level of the source
tree, because the actual use cases only have relative paths in @INC when
invoked from the top level, with absolute paths in @INC for the use cases
that invoke perltoc from other directories. Hence, it's always safe to change
to the top level of the source tree. This permits future simplification and
refactoring.
pod/buildtoc