Hi Perl Wisdom Holders,

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.

PAGER=/usr/local/bin/less perl -d buggy_script.pl export PAGER=/usr/local/bin/less perl -d buggy_script.pl
or within the debug session
DB<3> o pager=/usr/local/bin/less pager = '|/usr/local/bin/less' DB<4> o pager? pager = '|/usr/local/bin/less'
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".

So probably wrong syntax here, I tried

vi .perldb $DB::option{pager}='/usr/local/bin/less'
Well, all these tricks didn't work at all.

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

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&#091;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>
Has anyone come accross this who could tell me what the remedy is?

Regards

Edit by tye to replace PRE with proper formatting


In reply to Perl 5.8.0 debugger annoyances by SIGSEGV

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.