summaryrefslogtreecommitdiff
path: root/lib/perl5db.pl
diff options
context:
space:
mode:
authorJohn E. Malmberg <wb8tyw@qsl.net>2008-04-27 19:39:16 -0500
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2008-04-30 11:56:36 +0000
commit98274836b09df4ae5d763fdb09abc6658450cbc2 (patch)
treefd5c6eb65e59e962f250d5125526034074eac0d6 /lib/perl5db.pl
parenta91d1d4276ac73a4692bb4f0f5725c1b2817cfa8 (diff)
downloadperl-98274836b09df4ae5d763fdb09abc6658450cbc2.tar.gz
[patch]perl5db.pl, perl5db.t - LINUX/UNIX/CYGWIN/VMS
From: "John E. Malmberg" <wb8tyw@qsl.net> Message-id: <48156304.30201@qsl.net> p4raw-id: //depot/perl@33771
Diffstat (limited to 'lib/perl5db.pl')
-rw-r--r--lib/perl5db.pl26
1 files changed, 13 insertions, 13 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 2167f789a5..40d236116f 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -1363,7 +1363,9 @@ running interactively, this is C<.perldb>; if not, it's C<perldb.ini>.
# As noted, this test really doesn't check accurately that the debugger
# is running at a terminal or not.
-if ( -e "/dev/tty" ) { # this is the wrong metric!
+my $dev_tty = '/dev/tty';
+ $dev_tty = 'TT:' if ($^O eq 'VMS');
+if ( -e $dev_tty ) { # this is the wrong metric!
$rcfile = ".perldb";
}
else {
@@ -6100,6 +6102,16 @@ qq[3>&1 xterm -title "Daughter Perl debugger $pids $name" -e sh -c 'tty 1>&3;\
$pidprompt = ''; # Shown anyway in titlebar
+ # We need $term defined or we can not switch to the newly created xterm
+ if ($tty ne '' && !defined $term) {
+ eval { require Term::ReadLine } or die $@;
+ if ( !$rl ) {
+ $term = new Term::ReadLine::Stub 'perldb', $IN, $OUT;
+ }
+ else {
+ $term = new Term::ReadLine 'perldb', $IN, $OUT;
+ }
+ }
# There's our new TTY.
return $tty;
} ## end sub xterm_get_fork_TTY
@@ -6766,18 +6778,6 @@ we go ahead and set C<$console> and C<$tty> to the file indicated.
sub TTY {
- # With VMS we can get here with $term undefined, so we do not
- # switch to this terminal. There may be a better place to make
- # sure that $term is defined on VMS
- if ( @_ and ($^O eq 'VMS') and !defined($term) ) {
- eval { require Term::ReadLine } or die $@;
- if ( !$rl ) {
- $term = new Term::ReadLine::Stub 'perldb', $IN, $OUT;
- }
- else {
- $term = new Term::ReadLine 'perldb', $IN, $OUT;
- }
- }
if ( @_ and $term and $term->Features->{newTTY} ) {
# This terminal supports switching to a new TTY.