Tiny Core Linux

Tiny Core Base => TCB Bugs => Topic started by: polikuo on April 08, 2021, 06:31:41 AM

Title: perl pager
Post by: polikuo 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
Title: Re: perl pager
Post by: Rich 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.
Title: Re: perl pager
Post by: polikuo 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
Title: Re: perl pager
Post by: Rich 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.
Title: Re: perl pager
Post by: Juanito 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

Title: Re: perl pager
Post by: Juanito 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'
Title: Re: perl pager
Post by: polikuo 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.
Title: Re: perl pager
Post by: Juanito 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.
Title: Re: perl pager
Post by: polikuo 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 (https://metacpan.org/pod/IO::Pager) 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.
Title: Re: perl pager
Post by: Juanito on January 07, 2022, 07:53:28 AM
Recompiled perl5 posted for you to play with  :)
Title: Re: perl pager
Post by: polikuo 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