In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/d463cf2310425ca05fe65f1ee4a376276ab61074?hp=a3e07c8779a37a0cc0a4e5ceac72eec0b30c0c0c>

- Log -----------------------------------------------------------------
commit d463cf2310425ca05fe65f1ee4a376276ab61074
Author: Josh ben Jore <[email protected]>
Date:   Thu Jul 15 13:06:28 2010 +0000

    Stop using $ENV{LESS} for parameters not intended for less

M       lib/perl5db.pl

commit bf320d637919b3a2a72298748aa76e686e9b3e45
Author: Josh ben Jore <[email protected]>
Date:   Thu Jul 15 13:04:26 2010 +0000

    Configure has a path to less and perl5db.pl can use it

M       lib/perl5db.pl
-----------------------------------------------------------------------

Summary of changes:
 lib/perl5db.pl |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index b49fc41..4027b45 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -7577,14 +7577,20 @@ sub print_help {
 
 This routine does a lot of gyrations to be sure that the pager is C<less>.
 It checks for C<less> masquerading as C<more> and records the result in
-C<$ENV{LESS}> so we don't have to go through doing the stats again.
+C<$fixed_less> so we don't have to go through doing the stats again.
 
 =cut
 
 sub fix_less {
 
+    my $config_less = eval {
+       require Config;
+       $Config::Config{less};
+    };
+    return $config_less if $config_less;
+
     # We already know if this is set.
-    return if defined $ENV{LESS} && $ENV{LESS} =~ /r/;
+    return if $fixed_less;
 
     # Pager is less for sure.
     my $is_less = $pager =~ /\bless\b/;
@@ -7603,7 +7609,7 @@ sub fix_less {
 
     # changes environment!
     # 'r' added so we don't do (slow) stats again.
-    $ENV{LESS} .= 'r' if $is_less;
+    $fixed_less = 1 if $is_less;
 } ## end sub fix_less
 
 =head1 DIE AND WARN MANAGEMENT

--
Perl5 Master Repository

Reply via email to