texinfo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

texi2any Perl module search path


From: Gavin Smith
Subject: texi2any Perl module search path
Date: Wed, 29 Jul 2015 18:46:40 +0100

I'm just getting my thoughts together here, but maybe someone will
have something to add.

I was thinking about the search path for Perl modules for texi2any and
its tests.  When I had to add the directory/-ies holding the
XSParagraph files, I had to add them to quite a few places, for
example tp/tests/run_parser_all.sh. It would be nice to be able to
centralize the alterations to the module search path somehow - like
tp/t/test_utils.pl already does for most of the tests. It would make
changing module locations easier to do correctly.

My thought was to have a Perl module like "Texinfo::Modules" that
could make the necessary changes to @INC, that could be imported with
"use" or "require", perhaps conditional on an environmental variable
(top_srcdir, or TEXINFO_DEV_SOURCE?).

One thing I'd like to fix is the fact that an installed "makeinfo"
uses the modules from the source directory when that is the current
working directory. Maybe this could be part of this change.

Possibly the comment about having to "push" extra directories instead
of "unshift"ing them could become no longer true if the need to add
extra directories with -I flags passed to Perl was removed. This is
done for a few tests and in makefiles, for example:

MAKEINFO = $(PERL) -I "$(tpdir)" -I "$(tplibdir)/libintl-perl/lib" -I
"$(tpdir)/Texinfo/Convert/XSParagraph" -I
"../tp/Texinfo/Convert/XSParagraph" -I
"$(tplibdir)/Unicode-EastAsianWidth/lib" -I
"$(tplibdir)/Text-Unidecode/lib" $(top_builddir)/tp/texi2any

in doc/Makefile.am, but maybe this information could be passed by
environmental variables. Maybe it would be enough to export
TEXINFO_DEV_SOURCE=1 along with top_builddir and top_srcdir.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]