SIGSEGV has asked for the wisdom of the Perl Monks concerning the following question:
I'm a newbie in your divine monastery. So please be clement if my posting here offends your code of conduct. (I haven't discovered all corners of the monastery yet, nor have read the FAQs thoroughly)
I got so accustomed to the nice built-in Perl debugger that I can hardly do without anymore.
Recently I upgraded my Perl from 5.6.0 to 5.8.0 i.e. built it from the source tarball stable.tar.gz on HP-UX 11.00 and 11.11
I used the the HP-UX ANSI C compiler because I needed to install DBD::Oracle as well, which caused me too much grief to build with GNU gcc until I got hold of the HP compiler.
My bearable though annoying "trouble" with this build is the strange behaviour of the Perl debugger.
When I built this Perl 5.8.0 I only had the standard HP-UX pager more on the box and no PAGER env var set. Later I additionally installed the GNU Pager less.
I like to inspect my nested data structures in the Perl debugger. Especially the Data::Dumper like dump when one is x'ing a LoL reference is a nice feature.
e.g. DB<1> x \%nested_hash Since these can get quite large I used to pipe it into my pager like DB<2> |x \%nested_hash But somehow this feature doesn't seem to work in the Perl 5.8.X debugger anymore.
I tried all feasible sorts of invocation.
e.g.
or within the debug sessionPAGER=/usr/local/bin/less perl -d buggy_script.pl export PAGER=/usr/local/bin/less perl -d buggy_script.pl
or DB<5> $ENV{PAGER}='/usr/local/bin/less' I even tried to edit a .perldb file though I found no sample or hints on the required format in "perldoc DB".DB<3> o pager=/usr/local/bin/less pager = '|/usr/local/bin/less' DB<4> o pager? pager = '|/usr/local/bin/less'
So probably wrong syntax here, I tried
Well, all these tricks didn't work at all.vi .perldb $DB::option{pager}='/usr/local/bin/less'
The output may be piped through the pager (because there is a short but noticable latency), but nothing gets displayed on the debugger screen.
Here's an example
Has anyone come accross this who could tell me what the remedy is?DB<2> o pager? pager = '|/usr/bin/more' DB<3> |x \%mnt DB<4> @a=1..100 DB<5> |x @a DB<6> o pager? pager = '|/usr/bin/more' DB<7> o pager=/usr/local/bin/less pager = '|/usr/local/bin/less' DB<8> !5 |x @a DB<9> x @a[0..4] 0 1 1 2 2 3 3 4 4 5 DB<10> |x @a DB<11> p exists $ENV{PAGER} DB<12> $ENV{PAGER}='/usr/local/bin/less' DB<13> p $ENV{PAGER} /usr/local/bin/less DB<14> !10 DB<15>
Regards
Edit by tye to replace PRE with proper formatting
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl 5.8.0 debugger annoyances
by demerphq (Chancellor) on Dec 09, 2002 at 18:53 UTC | |
|
Re: Perl 5.8.0 debugger annoyances
by Jaap (Curate) on Dec 09, 2002 at 15:30 UTC | |
by SIGSEGV (Sexton) on Dec 10, 2002 at 12:18 UTC | |
|
Re: Perl 5.8.0 debugger annoyances
by pg (Canon) on Dec 10, 2002 at 04:08 UTC | |
by SIGSEGV (Sexton) on Dec 10, 2002 at 08:56 UTC |