in reply to Test failing during CPAN Testing

Something weird happened (in linux, perl 5.36.0), I have downloaded the module (v1.11) from CPAN and some tests failed. After a while I re-donwloaded the module, erasing previous dir, and all tests passed. Without setting any ENV in the terminal. I have also noticed that your files are dos-encoded (^M). This shouldn't be a problem while running it in non-windows. But you are setting ENV and __DATA__ and verbatim JSON. Just a very longshot.

Anyway, I found 2 unrelated points you may want to correct: 1) VERSION in pod is 1.10, while $VERSION is 1.11. 2) perl Makefile.PL complained about not finding the ABSTRACT in your pm file. You can fix this by not enclsoing the module name in link tags (<L>).

bw, bliako

Replies are listed 'Best First'.
Re^2: Test failing during CPAN Testing
by Bod (Parson) on Jun 19, 2023 at 22:05 UTC
    Something weird happened (in linux, perl 5.36.0), I have downloaded the module (v1.11) from CPAN and some tests failed

    That is weird because all the CPAN Tester tests for that v1.11 have passed! Are you sure you didn't download v1.10 which was the latest version until a few hours ago? It's v1.10 that is failing on Linux but passing on Windows.

    1) VERSION in pod is 1.10, while $VERSION is 1.11

    Thanks!
    I'll be more careful on the next release...

    2) perl Makefile.PL complained about not finding the ABSTRACT in your pm file. You can fix this by not enclsoing the module name in link tags (<L>)

    Ah...that's how I fix it!
    I had been trying to follow these instructions and thought it had a hyphen and an abstract.

    Thanks - your two points have been corrected in my source code and will make it to CPAN on the next release.

    I would really love to know what's happening with v1.10 to make it fail on Linux...I don't have a Linux machine to test it.

    I should have an i5 4th generation with 8Gb RAM and 256Gb SSD spare soon when I upgrade my partner's desktop. Currently, it runs Windows 10 Pro but it might be a plan to put Linux of some kind on that so I can test things and try to find my way around *nix. That spec should run Linux reasonably well, shouldn't it?

      I don't have a Linux machine to test it.
      1. Download a CD/DVD installer ISO image from https://www.debian.org/ (or use any other x86/x86-64 Linux you like)
      2. Download and install Virtualbox
      3. Create a VM
      4. Set the VM network interface to bridge mode with your real network interface if you use wired network, use NAT if you use Wifi
      5. Insert the ISO image into the virtual optical drive of the VM
      6. Run the Linux installer

      To install debian, the netinstall image should be sufficient. It will download every package beyond the basic installation from the network.

      Alexander

      --
      Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)

        I had overlooked a Virtual Machine...
        Perhaps that is a good way forward.

        In my last employed job I used Virtual Machines quite a lot. Mostly to create MSI installers that we could push to all the Windows machines around the school. That was a long time ago...nearly 2 decades ago - where does the time go?

      > I'll be more careful on the next release...

      You can also write a test for it so it doesn't happen again. For example, see xt/version.t in one of my modules.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
        You can also write a test for it so it doesn't happen again.

        Thanks choroba very helpful 🙂

        I've used your test code, modified for my needs and incorporated it into the tests for the latest release of Business::Stripe::Webhook. I shall investigate your other tests in time...

      I don't have a Linux machine to test it.

      Windows has a builtin VM for Linux: WSL 2. For example, I run Ubuntu (from here) using this VM.