summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2006-11-25 22:19:14 +0000
committerCraig A. Berry <craigberry@mac.com>2006-11-25 22:19:14 +0000
commitcd1191f1e03afafd6ab152fc2335758ab5cd3235 (patch)
treeb73e1363331ce5094f86933f7624e67f8b0a6298 /lib
parent0dc418cbde48cb38a38731db29a06b0f700688d6 (diff)
downloadperl-cd1191f1e03afafd6ab152fc2335758ab5cd3235.tar.gz
xterm debugger support for VMS from John Malmberg (with revisions)
p4raw-id: //depot/perl@29380
Diffstat (limited to 'lib')
-rw-r--r--lib/perl5db.pl15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index 2c2f923f31..2b022d4480 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -1721,7 +1721,7 @@ and if we can.
if ($console) {
# If we have a console, check to see if there are separate ins and
- # outs to open. (They are assumed identiical if not.)
+ # outs to open. (They are assumed identical if not.)
my ( $i, $o ) = split /,/, $console;
$o = $i unless defined $o;
@@ -6734,6 +6734,19 @@ we go ahead and set C<$console> and C<$tty> to the file indicated.
=cut
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.