Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

TimeDate 2.30 - Bug in test-code

by Skeeve (Parson)
on Jan 10, 2020 at 09:20 UTC ( #11111277=perlquestion: print w/replies, xml ) Need Help??

Skeeve has asked for the wisdom of the Perl Monks concerning the following question:

Yesterday I stumbled across a bug in

One of the modules I install in a docker image is depending on this module but it failed to install.

Reason given was

Redundant argument in printf at t/date.t line 180.

Looking at that line printf "%-40s\t%s\n", $_,$x,"\n"; it's clear that the ,"\n" is the redundant part.

Besides mailing the author (who didn't provide any contribution information), what could one do to fix this issue?

For the time being I force-install the module. Better would be, I guess, to apply a diff.


Replies are listed 'Best First'.
Re: TimeDate 2.30 - Bug in test-code
by marto (Cardinal) on Jan 10, 2020 at 09:31 UTC

    " it's clear that the ,"\n" is the redundant part."

    Are you sure about that? rt://124509 (note the patch and the last comment regarding distroprefs) and issue 20.

      Those seem to be about t/getdate.t rather than t/date.t so that's a different problem I think? rt://TimeDate seems to have a sizeable (and increasing) number of issues, alas.

      ++ @ marto

      You are right. Thanks for looking into it and pointing this out

      Question: Is there a way cpanm can automatically apply the patch given? I have no clue whether or not it's possible.

      Answer: No, there isn't

      Does cpanm support the feature XYZ of CPAN and CPANPLUS? Most likely not. Here are the things that cpanm doesn't do by itself.


      Patching CPAN modules with distroprefs.


        In case anyone is interested, this is my workaround in my docker-compose.yaml

        COPY cpanfile .
        # Patched TimeDate. See
        COPY TimeDate-2.30 /TimeDate-2.30
        RUN cpanm /TimeDate-2.30 \
          && cpanm --installdeps . \
          && rm -rf TimeDate-2.30

        The local copy I have is already patched

        I'm sure there are better ways to achieve this

Re: TimeDate 2.30 - Bug in test-code
by hippo (Bishop) on Jan 17, 2020 at 16:16 UTC

    There is a new version out now which should fix this (and some other issues too).

      Thanks a lot!

      Today morning the module using the previous version switched to yours.


        You're welcome, but the only thing I did was let you know about it. Brother atoomic did all the work.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://11111277]
Approved by marto
Front-paged by haukex
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (4)
As of 2022-12-03 19:57 GMT
Find Nodes?
    Voting Booth?

    No recent polls found