Hi pg,
gathering from your nick name, if not you who else should be familiar with the inards of pagers ;-)
n.b. @ perlmonks' moderators, sorry for using the <pre> tag once again.
When I logged in I just noticed for a second your request on my first posting here to refrain from using this tag.
I'm afraid, I still will have to read your FAQs on formatting guidelines.
I have been too impatient to reply to my post's responders, and didn't know for now how else to avoid the clutter.
Now back to pg.
Of course I felt that setting $ENV{PAGER} within the debug session was at a too late stage.
That's why I already tried the shell's (i.e. HP-UX's standard shell which is a POSIX Bourne type) way of giving processes an environment
by invocating the Perl debugger like this:
$ PAGER=/usr/local/bin/less /usr/bin/perl -de ./my_buggy_script.pl
(of course one could have also used the Unix "env" command)
and I also tried the even better way (like you mentioned) of explicitly exporting PAGER:
$ export PAGER=/usr/local/bin/less
$ printenv PAGER
/usr/local/bin/less
$ perl -de my_buggy_script.pl
Then in the debugger I did this:
'time' => 1039509243
'/var/spool/sw' => HASH(0x4033aca0)
'basetype' => 'vxfs'
'bavail' => 262045
'bfree' => 279512
'blocks' => 512000
'bsize' => 8192
'favail' => 69876
'ffree' => 69876
'files' => 73740
'flag' => 0
'frsize' => 1024
'fsid' => 1073741834
'fstr' => '/var/spool/sw'
'namemax' => 255
'size' => 512000
'time' => 1037307204
DB<4> H
3: x \%mnt
2: |x \%mnt
1: o pager?
DB<4> !1
o pager?
pager = '|/usr/local/bin/less'
DB<5>
n.b. the hash %mnt is a lol with mount points as keys and as values the results of statvfs syscalls on these as a hashref
(retrieved through the wonderful Filesys::Statvfs CPAN module).
By the debugger history above I just wanted to show that "|x \%mnt" fails (i.e. displays nothing),
whereas "x \%mnt" scrolls over the screen (I only copied the last key's value here).
This only happens with my Perl builds of "new" releases > 5.6.0
On the boxes where I still have Perl <= 5.6.0 the debugger works as expected,
and honours preset PAGER settings.
Looks to me as if there is a bug in the Perl port for HP-UX 11.X 64Bit.
Btw, have you tried to build a Perl 5.8.X on HP-UX (in case you have access to this platform)?
Maybe the Configure routine is broken for this platform.
I can tell you how long I struggled to get DBD::Oracle working on this platform.
Maybe I miss some library, patch, or the linking was insufficient after Configure and make
(e.g. PIC etc.)
Would be nice to here from someone who uses the Perl debugger on HP-UX
if they encounter similar strangenesses.
Anyway, many thanks for pointing me to the involved Perl code.
Edit by tye (replace PRE with formatting) |