Skip Menu |

This queue is for tickets about the IO-Pager CPAN distribution.

Report information
The Basics
Id: 133651
Status: resolved
Priority: 0/
Queue: IO-Pager

People
Owner: Nobody in particular
Requestors: CXW [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.03
Fixed in: 2.00



Subject: cpm installation does not add the binary to the path
Thanks for this pager, which looks quite nice! I have local::lib installed in ~/perl5. Normally, when I do `cpm install -gv MODULE`, the scripts from that module are copied to ~/perl5/bin, which is in my PATH. However, when I installed IO::Pager 1.03 that way, tp(1) was not copied to ~/perl5/bin. It was left in `~/perl5/lib/perl5/IO/Pager/tp`. Would you please update the installation to move tp to PATH? I think this only requires adding it to the EXE_FILES param to WriteMakefile(), but I haven't tested that yet. Thank you for considering this request! Chris (PS- if there is a public repo somewhere with this code, I would be happy to submit a PR if you wish. I could alternatively send a patch.)
Show quoted text
> I have local::lib installed in ~/perl5. Normally, when I do `cpm > install -gv MODULE`, the scripts from that module are copied to > ~/perl5/bin, which is in my PATH. However, when I installed IO::Pager > 1.03 that way, tp(1) was not copied to ~/perl5/bin. It was left in > `~/perl5/lib/perl5/IO/Pager/tp`. Would you please update the > installation to move tp to PATH? I think this only requires adding it > to the EXE_FILES param to WriteMakefile(), but I haven't tested that > yet. Thank you for considering this request!
It drops it in lib because it's required for the current implementation of IO::Pager:Perl since I've not been able to to get that to work with perl's fork() instead of using the system. I can add it to EXE_FILES too though. Show quoted text
> (PS- if there is a public repo somewhere with this code, I would be > happy to submit a PR if you wish. I could alternatively send a > patch.)
The semi-official repository is https://github.com/fangly/io-pager But I don't use it much these days because github's TLS requirements don't mesh with the tool chain on my main development machine. Attaching patches to tickets is fine, and also leaves a cleaner record of things all in one place IMO
Thanks for the updates! Patch attached :) . Tested on my Perl 5.28.1 on Ubuntu, both using local::lib and installing into the system install dirs as root. On Sun Nov 01 14:49:03 2020, JPIERCE wrote: Show quoted text
> > I have local::lib installed in ~/perl5. Normally, when I do `cpm > > install -gv MODULE`, the scripts from that module are copied to > > ~/perl5/bin, which is in my PATH. However, when I installed > > IO::Pager > > 1.03 that way, tp(1) was not copied to ~/perl5/bin. It was left in > > `~/perl5/lib/perl5/IO/Pager/tp`. Would you please update the > > installation to move tp to PATH? I think this only requires adding > > it > > to the EXE_FILES param to WriteMakefile(), but I haven't tested that > > yet. Thank you for considering this request!
> It drops it in lib because it's required for the current > implementation of IO::Pager:Perl since I've not been able to to get > that to work with perl's > fork() instead of using the system. > > I can add it to EXE_FILES too though. >
> > (PS- if there is a public repo somewhere with this code, I would be > > happy to submit a PR if you wish. I could alternatively send a > > patch.)
> The semi-official repository is https://github.com/fangly/io-pager > But I don't use it much these days because github's TLS requirements > don't mesh with the tool chain on my main development machine. > > Attaching patches to tickets is fine, and also leaves a cleaner record > of things all in one place IMO
Subject: 0001-Install-tp-in-bin-directory-fixes-RT-133651.patch
From b6f74f97e17fdfcae29bb9f25b264acad3dd9dde Mon Sep 17 00:00:00 2001 From: Chris White <cxwembedded@gmail.com> Date: Sun, 1 Nov 2020 21:19:17 -0500 Subject: [PATCH] Install tp in bin directory (fixes RT#133651) --- CHANGES | 3 +++ Makefile.PL | 1 + 2 files changed, 4 insertions(+) diff --git a/CHANGES b/CHANGES index c02a4b5..61a0cb0 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ Revision history for Perl extension IO::Pager. +1.xx x + Install tp into the bin directory (RT#133651) + 1.03 Jun 13 2020 Fix destruction warnings in Buffered diff --git a/Makefile.PL b/Makefile.PL index 34c9536..c8553d4 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -5,6 +5,7 @@ WriteMakefile( 'MIN_PERL_VERSION' => 5.8.0, 'NAME' => 'IO::Pager', 'VERSION_FROM' => 'lib/IO/Pager.pm', # finds $VERSION + 'EXE_FILES' => ['lib/IO/Pager/tp'], 'BUILD_REQUIRES' => { 'Test::More' => 0.88, 'Config' => 0, -- 2.28.0
The code in 2.01 is different from the patch posted here: EXE_FILES => [ 'blib/lib/IO/Pager/tp' ], and it does not work because of that when building in parallel: $ /usr/bin/make -j5 make: *** No rule to make target 'blib/lib/IO/Pager/tp', needed by 'manifypods'. Stop. make: *** Waiting for unfinished jobs.... cp lib/IO/Pager/less.pm blib/lib/IO/Pager/less.pm cp lib/IO/Pager/Unbuffered.pm blib/lib/IO/Pager/Unbuffered.pm cp lib/IO/Pager/Buffered.pm blib/lib/IO/Pager/Buffered.pm cp lib/IO/Pager/Page.pm blib/lib/IO/Pager/Page.pm cp lib/IO/Pager/tp blib/lib/IO/Pager/tp cp lib/IO/Pager.pm blib/lib/IO/Pager.pm cp lib/IO/Pager/Perl.pm blib/lib/IO/Pager/Perl.pm This fixes it: --- a/Makefile.PL +++ b/Makefile.PL @@ -26,7 +26,7 @@ WriteMakefile( 'Text::Wrap' => 0, 'Tie::Handle' => 0, }, - EXE_FILES => [ 'blib/lib/IO/Pager/tp' ], + EXE_FILES => [ 'lib/IO/Pager/tp' ], META_MERGE => { "meta-spec" => { version => 2 }, runtime => {
The code was implemented before your patch was supplied. Nor was it obvious that someone would try to build this in parallel or that make would be a PITA about it. I'll revise in the next release. On Tue Nov 03 05:10:14 2020, ppisar wrote: Show quoted text
> The code in 2.01 is different from the patch posted here: > > EXE_FILES => [ 'blib/lib/IO/Pager/tp' ], > > and it does not work because of that when building in parallel: > > $ /usr/bin/make -j5 > make: *** No rule to make target 'blib/lib/IO/Pager/tp', needed by > 'manifypods'. Stop. > make: *** Waiting for unfinished jobs.... > cp lib/IO/Pager/less.pm blib/lib/IO/Pager/less.pm > cp lib/IO/Pager/Unbuffered.pm blib/lib/IO/Pager/Unbuffered.pm > cp lib/IO/Pager/Buffered.pm blib/lib/IO/Pager/Buffered.pm > cp lib/IO/Pager/Page.pm blib/lib/IO/Pager/Page.pm > cp lib/IO/Pager/tp blib/lib/IO/Pager/tp > cp lib/IO/Pager.pm blib/lib/IO/Pager.pm > cp lib/IO/Pager/Perl.pm blib/lib/IO/Pager/Perl.pm > > This fixes it: > > --- a/Makefile.PL > +++ b/Makefile.PL > @@ -26,7 +26,7 @@ WriteMakefile( > 'Text::Wrap' => 0, > 'Tie::Handle' => 0, > }, > - EXE_FILES => [ 'blib/lib/IO/Pager/tp' ], > + EXE_FILES => [ 'lib/IO/Pager/tp' ], > META_MERGE => { > "meta-spec" => { version => 2 }, > runtime => {