Skip Menu |
 

This queue is for tickets about the Pod-Usage CPAN distribution.

Report information
The Basics
Id: 131845
Status: resolved
Estimated: 30 min
Priority: 0/
Queue: Pod-Usage

People
Owner: Marek.Rouchal [...] gmx.net
Requestors: karl [...] freefriends.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 1.69
Fixed in: 1.70



Subject: $Config{pager} string can have arguments
Date: Sun, 16 Feb 2020 15:10:17 -0700
To: bug-Pod-Usage [...] rt.cpan.org
From: Karl Berry <karl [...] freefriends.org>
Download (untitled) / with headers
text/plain 1.2k
Line 164 of Pod/Usage.pm from perl 5.30.1 is: system(($Config{pager} || $ENV{PAGER} || '/bin/more'), $1); On various Unixen, $Config{pager} is typically the string "less -R" (unless the less is ancient and doesn't support -R). Since perl 5.12 or so, Perl's Configure script does this (line 2624ff.): *) if $less -R </dev/null >/dev/null 2>&1; then echo "Substituting less -R for less." less="$less -R" The result is that Pod/Usage.pm system() call looks for the executable named "less -R", rather than invoking less with the option -R. I reported this at https://github.com/perl/perl5/issues/16246 and the conclusion is apparently to request the change here. Of course there are several possible fixes. One suggestion in the above report was to use the shellwords() function in Text::ParseWords. I can make up a patch if you like, but I surmised you might prefer some other approach. Here is a tiny example program: use Config; print "pager: $Config{pager}\n"; $ret = system(($Config{pager} || $ENV{PAGER} || '/bin/more'), "/etc/issue"); print "return: $ret\n"; Given the pager value of "less -R", the return value is -1 and nothing actually gets executed, so /etc/issue is not shown. Wdyt? --thanks, karl.
Download (untitled) / with headers
text/plain 138b
Fixed in connection with #131844 - will use a string in the system() command, and do some effort to quote metacharacters in the file name.
Closing as fixed in Pod-Usage-1.70. Thank you for your patience. -Marek


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.