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

Patrice Dumas <[email protected]> Sat, 25 Jul 2026 11:36:03 +0200
Newsgroups gmane.comp.tex.texinfo.bugs
Message-ID <[email protected]>
On Fri, Jul 24, 2026 at 06:30:53PM +0000, Dimitris Papavasiliou wrote:
> Use of uninitialized value $Texinfo::ModulePath::t2a_srcdir in join or string at /usr/local/bin/texi2any line 220.
> Use of uninitialized value $Texinfo::ModulePath::t2a_srcdir in join or string at /usr/local/bin/texi2any line 1547.
> Use of uninitialized value $Texinfo::ModulePath::t2a_builddir in join or string at /usr/local/bin/texi2any line 1552.
> Locales dir for document strings not found

Thanks for the report and the bisection.  It is indeed wrong to call
Texinfo::ModulePath->import() without paths arguments.  Most probably
XSLoader.pm should not be the first to call Texinfo::ModulePath->import()
(or load Texinfo::ModulePath), texi2any should.

I will revert this change to fix the immediate issue.

For a long-term fix, maybe a split of Texinfo::ModulePath should be in
order.  Indeed, Texinfo::ModulePath is now used for two purposes, its
orginial purpose, to setup the paths, but also to transmit the configure
result to modules.

> 
> 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]>
>  
>         * README-hacking, tta/README: add a short information on doing a new
> 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 = 1;
>      $Texinfo::ModulePath::t2a_builddir = '';
>    } else {
> +    Texinfo::ModulePath->import();
>      if ($Texinfo::ModulePath::enable_xs eq 'no') {
>        $disable_XS = 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
> 
>