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

I've uploaded Business::Stripe::WebCheckout to CPAN as a developer release. Release 1 failed when Stripe couldn't be contacted. Release 2 has cured this problem and, so far, all the CPAN Testers reports have passed 😊

However, Windows doesn't have gzip. So in Makefile.PL I have this line to use IO::Compress::Gzip which is included with Strawberry Perl:

dist => { COMPRESS => q{perl -MIO::Compress::Gzip=gzip,:constants -e" +my $$in = $$ARGV[0]; gzip($$in => qq($$in.gz), q(Level) => Z_BEST_COM +PRESSION, q(BinModeIn) => 1) or die q(gzip failed); unlink $$in;"}, S +UFFIX => 'gz', },
This is included in the tarball that was uploaded.

Does this need changing in the release?
My best guess is that it is OK as it is only used when building the distribution, not when installing it but I wanted to check this is correct.

Replies are listed 'Best First'.
Re: Making distribution on Strawberry Perl for CPAN
by syphilis (Archbishop) on Apr 17, 2021 at 01:12 UTC
    My best guess is that it is OK as it is only used when building the distribution, not when installing it but I wanted to check this is correct.

    I, too, can't see that it matters.

    However, another alternative would be to install gzip (and also tar, if you like) on your Windows system, as both are readily available:

    http://gnuwin32.sourceforge.net/packages/gzip.htm
    http://gnuwin32.sourceforge.net/packages/gtar.htm

    If you happen to have Cygwin or MSYS installed, then you already have both of those utilities.

    Cheers,
    Rob
      However, another alternative would be to install gzip

      Yes - that's the obvious answer isn't it?
      Clearly I was having a senior moment...

      Thanks

        Try out Alien::gzip before you do this manually. Not sure how this would fly on SP, but the main idea is the strategy it suggests - look for gzip, and if it's not there install it (can't suggest one personally). Another strategy is to use a module that implements gzip (or zip) in a portable way. Depending on your needs, of course.
Re: Making distribution on Strawberry Perl for CPAN
by perlfan (Parson) on Apr 17, 2021 at 13:52 UTC
    > when Stripe couldn't be contacted

    Consider using Test::Mock or mock directly; you need to test your stuff, not theirs.

      Consider using Test::Mock or mock directly; you need to test your stuff, not theirs

      Thanks, I shall have a look at that for future reference.

      The solution I am trying is described over here -> Re^6: [RFC] Module code and POD for CPAN - Testing and test file

      If I can get that to work then I feel it will be preferable as the end user doesn't have to install any more modules than necessary. Business::Stripe::WebCheckout has deliberately been written to only use core modules so it is easy to use on restrictive shared hosting.