WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: perl pager  (Read 4103 times)

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
perl pager
« on: April 08, 2021, 06:31:41 AM »
I can't go into details because of the wonderful server internal error that blocks me from the forum. perl should be re-configured, busybox less does not support -i -s -R options
« Last Edit: April 08, 2021, 06:41:53 AM by polikuo »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: perl pager
« Reply #1 on: April 08, 2021, 07:10:40 AM »
Hi polikuo
Busybox versions of commands don't always support all of their features. Install  less.tcz.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: perl pager
« Reply #2 on: April 08, 2021, 07:40:06 AM »
Hi polikuo
Busybox versions of commands don't always support all of their features. Install  less.tcz.

The point is, this may cause unwanted behavior

The path is set default to that configuration

Even if you do load less.tcz, you're still stuck with the busybox

I think it would be better to re-configure without path and options

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11213
Re: perl pager
« Reply #3 on: April 08, 2021, 01:44:27 PM »
Hi polikuo
You are correct. I missed the hard coded path. It's possible that was just an oversight. All the other paths on that line
begin with  /usr/local/.  Maybe Juanito can provide some insight.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: perl pager
« Reply #4 on: April 08, 2021, 10:49:46 PM »
The path was set to point to busybox less so that the less extension would not be needed - the "-isR" was a copy/paste from lfs.

I've never used the perl pager - does it work as expected if Config_heavy.pl is modified


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: perl pager
« Reply #5 on: April 08, 2021, 10:58:14 PM »
Code: [Select]
/usr/local/lib/perl5/5.32/core_perl/Config_heavy.pl:pager='/usr/bin/less -isR'

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: perl pager
« Reply #6 on: April 09, 2021, 01:44:28 AM »
I've never used the perl pager - does it work as expected if Config_heavy.pl is modified

Neither have I.

I was just practicing the art of building the tool chain and got concerned with that setting.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: perl pager
« Reply #7 on: April 09, 2021, 02:53:19 AM »
I'd propose, subject to somebody testing the perl pager, that it is set to "/usr/bin/less" the next time the perl extension is built.

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: perl pager
« Reply #8 on: January 07, 2022, 06:20:19 AM »
I've been trying to find a way to test this with no luck.
So I'm just posting what I've done here.

While I'm not 100% sure the module I'm using is the one that called less, but the manual is pretty intriguing.

Here are the steps:
Code: [Select]
$ tce-load -i compiletc cpanm
$ cd ~
$ rm -fr .cpan .cpanm perl5
$ cpan

  Would you like to configure as much as possible automatically?
  (Press Enter)
  What approach do you want?  (Choose 'local::lib', 'sudo' or 'manual')
  (Press Enter)
    install IO::Pager
    install IO::Pager
    exit

Note that I have to install the pager twice because the first time always fails.

The procedures may be questionable as I'm inexperienced with perl.

Edit: I can't post the script due to the server error.
The "Pager" looks fine, so I check the PID.
"ps" shows that perl called "less" in a different way.
« Last Edit: January 07, 2022, 06:35:05 AM by polikuo »

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: perl pager
« Reply #9 on: January 07, 2022, 07:53:28 AM »
Recompiled perl5 posted for you to play with  :)

Offline polikuo

  • Hero Member
  • *****
  • Posts: 714
Re: perl pager
« Reply #10 on: January 07, 2022, 11:10:37 AM »
I just mailed the modules as TCZs in case anyone is interested.

Recompiled perl5 posted for you to play with  :)

TBH, I don't see any difference.
Code: [Select]
$ ps
 6327 tc       perl pager.pl
 6328 tc       /usr/bin/less -EM