Use of uninitialized value $Texinfo::ModulePath::t2a_srcdir

Dimitris Papavasiliou <[email protected]> Fri, 24 Jul 2026 18:30:53 +0000
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <uIZ68wrcfzTDJkWZ2c8Q6GYR5IKjr8cHIX-28AfdTGgaa2ZN7HH14PZ4FtbS0hUiqra7VuLq7g754MVXBizMN9lrvZ8LyiPtRcsIS5orRMQ=@protonmail.ch>
After rebuilding Texinfo from the latest master branch, when invoking
texi2any with

texi2any -c HIGHLIGHT_SYNTAX\ source-highlight --html --split chapter -o ou=
tput_dir input.texi

it fails with the following error messages:

Use of uninitialized value $Texinfo::ModulePath::t2a_srcdir in join or stri=
ng at /usr/local/bin/texi2any line 220.
could not read extension file highlight_syntax.pm at /usr/local/bin/texi2an=
y line 679.

If invoking it with the "-c HIGHLIGHT_SYNTAX\ source-highlight" argument, I=
 get

Use of uninitialized value $Texinfo::ModulePath::t2a_srcdir in join or stri=
ng at /usr/local/bin/texi2any line 220.
Use of uninitialized value $Texinfo::ModulePath::t2a_srcdir in join or stri=
ng at /usr/local/bin/texi2any line 1547.
Use of uninitialized value $Texinfo::ModulePath::t2a_builddir in join or st=
ring at /usr/local/bin/texi2any line 1552.
Locales dir for document strings not found

I have bisected the issue to the following commit:

commit aec2d49774425aaf8b30dffacfedf4d502a39538
Author: Patrice Dumas <[email protected]>
Date:   Fri Jul 3 19:32:18 2026 +0200

    * tta/perl/Texinfo/XSLoader.pm (BEGIN): call Texinfo::ModulePath
    import after a successful require.

diff --git a/ChangeLog b/ChangeLog
index 9ce1242d58..365515e7f0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2026-07-03 Patrice Dumas  <[email protected]>
+
+       * tta/perl/Texinfo/XSLoader.pm (BEGIN): call Texinfo::ModulePath
+       import after a successful require.
+
 2026-07-03 Patrice Dumas  <[email protected]>
=20
        * README-hacking, tta/README: add a short information on doing a ne=
w
diff --git a/tta/perl/Texinfo/XSLoader.pm b/tta/perl/Texinfo/XSLoader.pm
index b22b6ff878..c09379c29b 100644
--- a/tta/perl/Texinfo/XSLoader.pm
+++ b/tta/perl/Texinfo/XSLoader.pm
@@ -40,6 +40,7 @@ BEGIN {
     $Texinfo::ModulePath::texinfo_uninstalled =3D 1;
     $Texinfo::ModulePath::t2a_builddir =3D '';
   } else {
+    Texinfo::ModulePath->import();
     if ($Texinfo::ModulePath::enable_xs eq 'no') {
       $disable_XS =3D 1;
     }

When I commend out the line it introduces, everything seems to be
fine, at least insofar as it doesn't output any error messages or exit
with an error status.

Best regards,
Dimitris