Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Use Perl Debugger, where input is the output from shell script

by LanX (Chancellor)
on Jul 23, 2013 at 19:29 UTC ( #1045940=note: print w/replies, xml ) Need Help??


in reply to Use Perl Debugger, where input is the output from shell script

after reading the OP again...

have a look at PERLDB_OPTS, especially TTY and noTTY, in perldebug#Configurable Options

After the rc file is read, the debugger reads the $ENV{PERLDB_OPTS} environment variable and parses this as the remainder of a "O ..." line as one might enter at the debugger prompt. You may place the initialization options TTY , noTTY , ReadLine , and NonStop there.

If your rc file contains:

parse_options("NonStop=1 LineInfo=db.out AutoTrace");

then your script will run without human intervention, putting trace information into the file db.out. (If you interrupt it, you'd better reset LineInfo to devtty if you expect to see anything.)

TTY

The TTY to use for debugging I/O.

noTTY

If set, the debugger goes into NonStop mode and will not connect to a TTY. If interrupted (or if control goes to the debugger via explicit setting of $DB::signal or $DB::single from the Perl script), it connects to a TTY specified in the TTY option at startup, or to a tty found at runtime using the Term::Rendezvous module of your choice.

This module should implement a method named new that returns an object with two methods: IN and OUT . These should return filehandles to use for debugging input and output correspondingly. The new method should inspect an argument containing the value of $ENV{PERLDB_NOTTY} at startup, or "$ENV{HOME}/.perldbtty$$" otherwise. This file is not inspected for proper ownership, so security hazards are theoretically possible.

Cheers Rolf

( addicted to the Perl Programming Language)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1045940]
help
Chatterbox?
[marto]: busy weekend, no me time :P
[Corion]: marto: Yeah, that's somewhat implied :) I was on the phone with my godson yesterday (they birthday), but I haven't seen them for two weeks now (vacation), relaxing, but I somewhat miss them too ;)
[Discipulus]: me waterpolo? oh no! i'm a no sport; the tournment was for the elder son
[karlgoethebier]: good morning
[Corion]: Discipulus: Ah, so he's the one getting almost drowned all the time - waterpolo certainly is no sport for me ;)
[karlgoethebier]: Corion: buy enough coke and popcorn...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2017-07-24 08:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (348 votes). Check out past polls.