13 if (!-c "/dev/null") {
14 print "1..0 # Skip: no /dev/null\n";
17 my $dev_tty = '/dev/tty';
18 $dev_tty = 'TT:' if ($^O eq 'VMS');
20 print "1..0 # Skip: no $dev_tty\n";
24 print "1..0 # Skip: \$ENV{PERL5DB} is already set to '$ENV{PERL5DB}'\n";
32 open RC, ">", ".perldb" or die $!;
35 # overly permissive perms gives "Must not source insecure rcfile"
36 # and hangs at the DB(1> prompt
37 chmod 0644, ".perldb";
40 my $target = '../lib/perl5db/t/eval-line-bug';
44 &parse_options("NonStop=0 TTY=db.out LineInfo=db.out");
56 "p \\\@{'main::_<$target'}",
63 local $ENV{PERLDB_OPTS} = "ReadLine=0";
64 runperl(switches => [ '-d' ], progfile => $target);
70 open I, "<", 'db.out' or die $!;
75 like($contents, qr/sub factorial/,
76 'The ${main::_<filename} variable in the debugger was not destroyed'
80 local $ENV{PERLDB_OPTS} = "ReadLine=0";
81 local $::TODO = "lvalueness isn't propagated in the debugger";
82 my $output = runperl(switches => [ '-d' ], progfile => '../lib/perl5db/t/lvalue-bug');
83 like($output, qr/foo is defined/, 'lvalue subs work in the debugger');
89 unlink qw(.perldb db.out);