Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > How to reassign DB::OUT?

Reply
Thread Tools

How to reassign DB::OUT?

 
 
J Krugman
Guest
Posts: n/a
 
      02-26-2004




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

 
Reply With Quote
 
 
 
 
Ilya Zakharevich
Guest
Posts: n/a
 
      02-27-2004
[A complimentary Cc of this posting was sent to
J Krugman
<(E-Mail Removed)>], who wrote in article <c1loa7$ghg$(E-Mail Removed)>:

> 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
 
Reply With Quote
 
 
 
 
J Krugman
Guest
Posts: n/a
 
      02-27-2004
In <c1n3m9$o9d$(E-Mail Removed)> Ilya Zakharevich <(E-Mail Removed)> writes:

>[A complimentary Cc of this posting was sent to
>J Krugman
><(E-Mail Removed)>], who wrote in article <c1loa7$ghg$(E-Mail Removed)>:


>> 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

 
Reply With Quote
 
Ilya Zakharevich
Guest
Posts: n/a
 
      02-27-2004
[A complimentary Cc of this posting was sent to
J Krugman
<(E-Mail Removed)>], who wrote in article <c1o66r$b0h$(E-Mail Removed)>:
> >But
> >personally, I would just call Dumpvar.pm manually...

>
> Yes, that's an alternative, but dumpvar.pm is not documented


Oups, it should have been Dumpvalue.pm.

Yours,
Ilya
 
Reply With Quote
 
J Krugman
Guest
Posts: n/a
 
      02-27-2004
In <c1o8gn$139l$(E-Mail Removed)> Ilya Zakharevich <(E-Mail Removed)> writes:

>[A complimentary Cc of this posting was sent to
>J Krugman
><(E-Mail Removed)>], who wrote in article <c1o66r$b0h$(E-Mail Removed)>:
>> >But
>> >personally, I would just call Dumpvar.pm manually...

>>
>> Yes, that's an alternative, but dumpvar.pm is not documented


>Oups, it should have been Dumpvalue.pm.


That's great! I much prefer the formatting of Dumpvalue.pm over
the one produced by Data:umper.

Thanks!

jill

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
How do I reassign USB ports Oldman@screwedup.com Computer Support 2 06-10-2006 10:28 PM
how to reassign variable biswaranjan.rath XML 3 05-05-2006 01:07 PM
Reassign value to private =?Utf-8?B?VGltOjouLg==?= ASP .Net 2 01-27-2005 10:15 AM
reassign keys in an STL map Shailesh Humbad C++ 7 11-02-2004 12:05 AM



Advertisments