How to reassign DB::OUT?

J

J Krugman

I have a huge data structure in the perl debugger, which I can view
with the x command. I would like to save the output of the x
command to a file. I thought that one way to do this would be to
reassign DB::OUT, but all my effort to do this have failed. How
can I reassign DB::OUT so that commands like 'x $foo' print to a
file?

Thanks,

jill
 
I

Ilya Zakharevich

[A complimentary Cc of this posting was sent to
J Krugman
I have a huge data structure in the perl debugger, which I can view
with the x command. I would like to save the output of the x
command to a file. I thought that one way to do this would be to
reassign DB::OUT, but all my effort to do this have failed. How
can I reassign DB::OUT so that commands like 'x $foo' print to a
file?

The simplest hack is to reset $ENV{PAGER} and do `|x $foo'... But
personally, I would just call Dumpvar.pm manually...

Hope this helps,
Ilya
 
J

J Krugman

In said:
[A complimentary Cc of this posting was sent to
J Krugman
I have a huge data structure in the perl debugger, which I can view
with the x command. I would like to save the output of the x
command to a file. I thought that one way to do this would be to
reassign DB::OUT, but all my effort to do this have failed. How
can I reassign DB::OUT so that commands like 'x $foo' print to a
file?
The simplest hack is to reset $ENV{PAGER} and do `|x $foo'...

I settled for a similar hack (O pager='> myfile', etc.).
But
personally, I would just call Dumpvar.pm manually...

Yes, that's an alternative, but dumpvar.pm is not documented, and
I have a hard time figuring out what the code does. What sub(s)
from dumpvar.pm would you call to get the same output as you'd get
from

|x $mongo_data_structure

jill
 
I

Ilya Zakharevich

[A complimentary Cc of this posting was sent to
J Krugman
Yes, that's an alternative, but dumpvar.pm is not documented

Oups, it should have been Dumpvalue.pm.

Yours,
Ilya
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top