in reply to No debug pager

The pager functionality works fine with Perl 5.8.0 debug, and I use it all the time.

What you need to do is to set environment variable PAGER from your OS/shell, BEFORE you start debug. It is too late, if you set $ENV{PAGER} after you start your debug, and it will not work.

Replies are listed 'Best First'.
Re: Re: No debug pager
by cpwillmot (Initiate) on Jan 15, 2003 at 09:36 UTC

    Thanks, but it IS set. And o pager? reports |less which works OK from the shell.

    Ah-ha! I just ran a test to check the behaviour and |h h worked! However, that was on a normal perl script. Trying it again on the (cgi) script I was working on and no output appeared.

    Not a problem now, but I'd like to understand what's happening. So, cutting it down to the simplest, I have two files 'test.pl' is the normal script and 'sql.pl' is the cgi one. They both comprise

    #!/usr/bin/perl
    use strict;
    use warnings;
    

    The both sit in /srv/www/cgi-bin/ (which SuSE 8.1 has handled by mod-perl, but perl wouldn't know that, would it?). The difference is that sql.pl has been cut down from the cgi script that wouldn't page and test.pl has been copied across from /usr/local/bin. Yet

    perl -d sql.pl
    ...
    DB<1> |h h
    

    still produces no output, while the same treatment of test.pl pages the help OK. If both files are copied to another directory, the problem disappears.

    How come perl is picky about that one file? Did the CGI module or mod_perl do something to the output stream? I know mod_perl produces curious effects, but surely I'm not using mod_perl from the perl debugger, especially once 'use CGI' etc. are removed?

    CGI programming is certainly different from what I expected. If it means anything, fatalsToBrowser wouldn't do anything either.