in reply to Re^2: How to make distribution for simple script with CPAN dependencies?
in thread How to make distribution for simple script with CPAN dependencies?

Oh my goodness, I found this bug; https://rt.cpan.org/Public/Bug/Display.html?id=26728

It is my exact issue, and I copied the lines in the "fix" directly into my local library to change Curses/UI/Language.pm, and I *think* it's working. I made a fatpack of my single-file perlscript and it doesn't break when it runs, but now I need to run it in an environment without my local lib in it.

*fingers crossed

Thks for the pointers! How would I get this patch into Curses::UI, or how can I set up patches like this so I don't lose them if I reinstall or something?

  • Comment on Re^3: How to make distribution for simple script with CPAN dependencies?

Replies are listed 'Best First'.
Re^4: How to make distribution for simple script with CPAN dependencies?
by hv (Prior) on Mar 11, 2024 at 16:15 UTC

    How would I get this patch into Curses::UI ...

    I'd start by looking at section VI of the CPAN FAQ. In this case, the lack of updates since 2011 suggests that you or someone else would probably need to volunteer to take over maintenance of the distribution.

    ... or how can I set up patches like this so I don't lose them if I reinstall or something?

    I don't know how others would do it, but I prefer to keep the installation of packages pretty manual. I create a build script for each module/version that I install, mostly auto-generated by a local script based on the URL of the download package, and then tweak and comment for any idiosyncracies noted when building. So for example I have /src/perl/build/Devel-Debug-DBGp-0.22, which applies the patch from issue #6:

    cd /src/perl wget -P archive https://cpan.metacpan.org/authors/id/M/MB/MBARBON/Deve +l-Debug-DBGp-0.22.tar.gz # requires: # ... cd /src/perl zcat archive/Devel-Debug-DBGp-0.22.tar.gz | tar xf - cd /src/perl/Devel-Debug-DBGp-0.22 patch -p0 </src/perl/build/Devel-Debug-DBGp-PUSHMARK.patch cd /src/perl/Devel-Debug-DBGp-0.22 ${PERL} Makefile.PL make all test install cd /src/perl rm -rf Devel-Debug-DBGp-0.22

    I usually build things by pasting relevant paragraphs from the build script into a terminal window, but it's easy to stitch these together to recreate a full build.

      You can use Distroprefs to automatically apply patches to CPAN distributions on installation.

      map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]