On Sun, Nov 15, 2020 at 03:13:20PM +0100, Patrice Dumas wrote: > Hello, > > Actually it is because of a change I am doing, as I cannot reproduce > with a fresh clone of the repository. But still there is something > strange going on with those error messages. Any idea on what's going > on? > > On Sun, Nov 15, 2020 at 02:58:29PM +0100, Patrice Dumas wrote: > > Hello, > > > > I would like to use only the perl code, so I set > > export TEXINFO_XS=omit > > > > But then I get some error messages: > > > > expanded_formats not a possible customization in Texinfo::Parser::parser > > include_directories not a possible customization in Texinfo::Parser::parser > > ENABLE_ENCODING not a possible customization in Texinfo::Parser::parser > > FORMAT_MENU not a possible customization in Texinfo::Parser::parser > > values not a possible customization in Texinfo::Parser::parser > > Can't locate object method "line_error" via package "Texinfo::Parser" at > > ../tp/Texinfo/ParserNonXS.pm line 3985, <FH> line 3. > > > > for example, in tp: > > > > TEXINFO_XS=omit > > export TEXINFO_XS=omit > > ./texi2any.pl tests/formatting/simplest.texi > > > > I can't see what's going wrong, in particular it doesn't seems that > > Texinfo/Report.pm where line_error is overriden in XS.
These messages indicate a problem with the Texinfo::Parser namespace. It is odd because you are managing to execute code in the Texinfo/Parser.pm file which declares the namespace as "Texinfo::Parser", so all symbols (such as %parser_default_configuration) should go into that namespace. It is just a hunch but are you creating any new Parser objects in your new code? You could also try running with TEXINFO_XS=debug to see if anything odd is happening, such as modules being initialised twice. I remember in the past there were subtle problems with overriding Perl namespaces by typeglob assignments where this would be ineffective for some code if done too late, but I don't believe that code is in there now. Both the XS and pure Perl modules should put their symbols in the same namespace (so at the top of Texinfo/ParserNonXS.pm there is the line "package Texinfo::Parser", not "package Texinfo::ParserNonXS"). If I remember correctly it should get inherited symbols (like line_error) when the import function runs. import is overridden in ParserNonXS.pm but this calls the usual import method Exporter::import at the end, so this should be OK.
