This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
[perl #72156]: substitute `less -R' for `less' for groff's new usage
authorJosh ben Jore <jjore@cpan.org>
Mon, 1 Feb 2010 16:05:13 +0000 (08:05 -0800)
committerJosh ben Jore <jjore@cpan.org>
Sun, 7 Feb 2010 20:42:47 +0000 (12:42 -0800)
of ANSI escape codes by setting $Config{less} (and thereby
$Config{pager}).

Configure

index 8d93a33..d9397bf 100755 (executable)
--- a/Configure
+++ b/Configure
@@ -2438,6 +2438,15 @@ for file in $trylist; do
                ;;
        esac
 done
+case "$less" in
+'')    ;;
+*)     if $less -R </dev/null >/dev/null; then
+               echo "Substituting less -R for less."
+               less="$less -R"
+               _less=$less
+       fi
+       ;;
+esac
 case "$egrep" in
 egrep)
        echo "Substituting grep for egrep."