Bug#1078097: cod-tools: autopkgtest regression: Attempt to call undefined import method with arguments

Niko Tyni ntyni at debian.org
Tue Aug 6 22:15:13 BST 2024


Package: cod-tools
Version: 3.10.0+dfsg-1
Severity: important
User: debian-perl at lists.debian.org
Usertags: perl-5.40-transition
Tags: patch

This package fails its autopkgtest checks with Perl 5.40
(currently in experimental.)

  https://ci.debian.net/packages/c/cod-tools/unstable/amd64/50041232/

    69s /tmp/autopkgtest-lxc.xs3evp70/downtmp/autopkgtest_tmp/tests/cases/cif2cod_001.inp: FAILED:
    69s 0a1
    69s > Attempt to call undefined import method with arguments ("cif_cell_contents") via package "COD::CIF::Data::CellContents" (Perhaps you forgot to load the package?) at <script_name> line <line_no>.
    69s /tmp/autopkgtest-lxc.xs3evp70/downtmp/autopkgtest_tmp/tests/cases/cif2cod_002.inp: FAILED:
    69s 0a1
    69s > Attempt to call undefined import method with arguments ("cif_cell_contents") via package "COD::CIF::Data::CellContents" (Perhaps you forgot to load the package?) at <script_name> line <line_no>.
    70s /tmp/autopkgtest-lxc.xs3evp70/downtmp/autopkgtest_tmp/tests/cases/cif2cod_003.inp: FAILED:
   [...]

The test failures are also visible in the build log, but the build still
succeeds.  It looks like the subdirectory make invocations in the main
Makefile lack error checking.

  https://perl.debian.net/rebuild-logs/perl-5.40/cod-tools_3.10.0%2Bdfsg-1/cod-tools_3.10.0%2Bdfsg-1%2Bb2_amd64-2024-08-03T07%3A34%3A21Z.build

Some information on this new warning can be found at

  https://metacpan.org/dist/perl/view/pod/perldiag.pod#Missing-comma-after-first-argument-to-return

I think this is a case of mutually recursive modules where the assignment
to @EXPORT_OK happens too late at run time while it's needed at compile
time. See the "Playing Safe" section in Exporter(3perl).

Tentative patch attached, this fixes it for me.
-- 
Niko Tyni   ntyni at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix-exporter-usage-with-mutually-recursi.patch
Type: text/x-diff
Size: 2578 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20240807/4b381384/attachment.patch>


More information about the debian-science-maintainers mailing list