# Changes: 0.94
# + A lot of things changed after 0.94. First of all, core now informs
# debugger about entry into XSUBs, overloaded operators, tied operations,
-# BEGIN and END. Handy with `O f=2'.
+# BEGIN and END. Handy with 'O f=2'.
# + This can make debugger a little bit too verbose, please be patient
# and report your problems promptly.
# + Now the option frame has 3 values: 0,1,2. XXX Document!
# due to the need to examine the return value.
#
# Changes: 0.95
-# + `v' command shows versions.
+# + 'v' command shows versions.
#
# Changes: 0.96
-# + `v' command shows version of readline.
-# primitive completion works (dynamic variables, subs for `b' and `l',
-# options). Can `p %var'
-# + Better help (`h <' now works). New commands <<, >>, {, {{.
+# + 'v' command shows version of readline.
+# primitive completion works (dynamic variables, subs for 'b' and 'l',
+# options). Can 'p %var'
+# + Better help ('h <' now works). New commands <<, >>, {, {{.
# {dump|print}_trace() coded (to be able to do it from <<cmd).
-# + `c sub' documented.
+# + 'c sub' documented.
# + At last enough magic combined to stop after the end of debuggee.
# + !! should work now (thanks to Emacs bracket matching an extra
-# `]' in a regexp is caught).
-# + `L', `D' and `A' span files now (as documented).
-# + Breakpoints in `require'd code are possible (used in `R').
+# ']' in a regexp is caught).
+# + 'L', 'D' and 'A' span files now (as documented).
+# + Breakpoints in 'require'd code are possible (used in 'R').
# + Some additional words on internal work of debugger.
-# + `b load filename' implemented.
-# + `b postpone subr' implemented.
-# + now only `q' exits debugger (overwritable on $inhibit_exit).
+# + 'b load filename' implemented.
+# + 'b postpone subr' implemented.
+# + now only 'q' exits debugger (overwritable on $inhibit_exit).
# + When restarting debugger breakpoints/actions persist.
# + Buglet: When restarting debugger only one breakpoint/action per
# autoloaded function persists.
# Changes: 0.97: NonStop will not stop in at_exit().
# + Option AutoTrace implemented.
# + Trace printed differently if frames are printed too.
-# + new `inhibitExit' option.
+# + new 'inhibitExit' option.
# + printing of a very long statement interruptible.
-# Changes: 0.98: New command `m' for printing possible methods
-# + 'l -' is a synonym for `-'.
+# Changes: 0.98: New command 'm' for printing possible methods
+# + 'l -' is a synonym for '-'.
# + Cosmetic bugs in printing stack trace.
-# + `frame' & 8 to print "expanded args" in stack trace.
+# + 'frame' & 8 to print "expanded args" in stack trace.
# + Can list/break in imported subs.
-# + new `maxTraceLen' option.
+# + new 'maxTraceLen' option.
# + frame & 4 and frame & 8 granted.
-# + new command `m'
-# + nonstoppable lines do not have `:' near the line number.
-# + `b compile subname' implemented.
+# + new command 'm'
+# + nonstoppable lines do not have ':' near the line number.
+# + 'b compile subname' implemented.
# + Will not use $` any more.
-# + `-' behaves sane now.
-# Changes: 0.99: Completion for `f', `m'.
-# + `m' will remove duplicate names instead of duplicate functions.
-# + `b load' strips trailing whitespace.
-# completion ignores leading `|'; takes into account current package
-# when completing a subroutine name (same for `l').
+# + '-' behaves sane now.
+# Changes: 0.99: Completion for 'f', 'm'.
+# + 'm' will remove duplicate names instead of duplicate functions.
+# + 'b load' strips trailing whitespace.
+# completion ignores leading '|'; takes into account current package
+# when completing a subroutine name (same for 'l').
# Changes: 1.07: Many fixed by tchrist 13-March-2000
# BUG FIXES:
# + Added bare minimal security checks on perldb rc files, plus
# Minor bugs corrected;
# + Support for auto-creation of new TTY window on startup, either
# unconditionally, or if started as a kid of another debugger session;
-# + New `O'ption CreateTTY
+# + New 'O'ption CreateTTY
# I<CreateTTY> bits control attempts to create a new TTY on events:
# 1: on fork()
# 2: debugger is started inside debugger
# function;
# + Consistent support for TTY names of the form "TTYin,TTYout";
# + Switch line-tracing output too to the created TTY window;
-# + make `b fork' DWIM with CORE::GLOBAL::fork;
+# + make 'b fork' DWIM with CORE::GLOBAL::fork;
# + High-level debugger API cmd_*():
# cmd_b_load($filenamepart) # b load filenamepart
# cmd_b_line($lineno [, $cond]) # b lineno [cond]
$slave_editor ? "enabled" : "available", ".\n"
);
print $OUT
-"\nEnter h or `h h' for help, or `$doccmd perldebug' for more help.\n\n";
+"\nEnter h or 'h h' for help, or '$doccmd perldebug' for more help.\n\n";
} ## end else [ if ($term_pid eq '-1')
} ## end unless ($runnonstop)
} ## end else [ if ($notty)
eval "\$cmd =~ $alias{$i}";
if ($@) {
local $\ = '';
- print $OUT "Couldn't evaluate `$i' alias: $@";
+ print $OUT "Couldn't evaluate '$i' alias: $@";
next CMD;
}
} ## end if ($alias{$i})
if ( ($try) = grep( m#^_<.*$file#, keys %main:: ) ) {
{
$try = substr( $try, 2 );
- print $OUT "Choosing $try matching `$file':\n";
+ print $OUT "Choosing $try matching '$file':\n";
$file = $try;
}
} ## end if (($try) = grep(m#^_<.*$file#...
# If not successfully switched now, we failed.
if ( !defined $main::{ '_<' . $file } ) {
- print $OUT "No file matching `$file' is loaded.\n";
+ print $OUT "No file matching '$file' is loaded.\n";
next CMD;
}
else {
# Couldn't open it.
- &warn("Can't execute `$1': $!\n");
+ &warn("Can't execute '$1': $!\n");
}
next CMD;
};
unless ( $piped = open( OUT, $pager ) ) {
# Couldn't open pipe to pager.
- &warn("Can't pipe output to `$pager'");
+ &warn("Can't pipe output to '$pager'");
if ( $pager =~ /^\|/ ) {
# Redirect I/O back again.
# most of the $? crud was coping with broken cshisms
# $? is explicitly set to 0, so this never runs.
if ($?) {
- print SAVEOUT "Pager `$pager' failed: ";
+ print SAVEOUT "Pager '$pager' failed: ";
if ( $? == -1 ) {
print SAVEOUT "shell returned -1\n";
}
=cut
# No more commands? Quit.
- $fall_off_end = 1 unless defined $cmd; # Emulate `q' on EOF
+ $fall_off_end = 1 unless defined $cmd; # Emulate 'q' on EOF
# Evaluate post-prompt commands.
foreach $evalarg (@$post) {
# Normalize for the purposes of our printing this.
local $\ = '';
local $" = ' ';
- print $OUT "Will stop on load of `@files'.\n";
+ print $OUT "Will stop on load of '@files'.\n";
} ## end sub cmd_b_load
=head3 C<$filename_error> (API package global)
local *dbline = $main::{ '_<' . $f };
# If there's an error, it's in this other file.
- local $filename_error = " of `$f'";
+ local $filename_error = " of '$f'";
# Find the breakable line.
breakable_line(@_);
local *dbline = $main::{ '_<' . $f };
# Localize the variables that break_on_line uses to make its message.
- local $filename_error = " of `$f'";
+ local $filename_error = " of '$f'";
local $filename = $f;
# Add the breakpoint.
} ## end if ($postponed{$subname...
elsif ( $postponed{$subname} eq 'compile' ) { $signal = 1 }
- #print $OUT "In postponed_sub for `$subname'.\n";
+ #print $OUT "In postponed_sub for '$subname'.\n";
} ## end sub postponed_sub
=head2 C<postponed>
my $file = $sub[$i]{file};
# Put in a filename header if short is off.
- $file = $file eq '-e' ? $file : "file `$file'" unless $short;
+ $file = $file eq '-e' ? $file : "file '$file'" unless $short;
# Get the actual sub's name, and shorten to $maxtrace's requirement.
$s = $sub[$i]{sub};
if ($tty) {
my ( $i, $o ) = split $tty, /,/;
$o = $i unless defined $o;
- open( IN, "<$i" ) or die "Cannot open TTY `$i' for read: $!";
- open( OUT, ">$o" ) or die "Cannot open TTY `$o' for write: $!";
+ open( IN, "<$i" ) or die "Cannot open TTY '$i' for read: $!";
+ open( OUT, ">$o" ) or die "Cannot open TTY '$o' for write: $!";
$IN = \*IN;
$OUT = \*OUT;
my $sel = select($OUT);
# Options are always all word characters, followed by a non-word
# separator.
- s/^(\w+)(\W?)// or print( $OUT "Invalid option `$_'\n" ), last;
+ s/^(\w+)(\W?)// or print( $OUT "Invalid option '$_'\n" ), last;
my ( $opt, $sep ) = ( $1, $2 );
# Make sure that such an option exists.
my $matches = grep( /^\Q$opt/ && ( $option = $_ ), @options )
|| grep( /^\Q$opt/i && ( $option = $_ ), @options );
- print( $OUT "Unknown option `$opt'\n" ), next unless $matches;
- print( $OUT "Ambiguous option `$opt'\n" ), next if $matches > 1;
+ print( $OUT "Unknown option '$opt'\n" ), next unless $matches;
+ print( $OUT "Ambiguous option '$opt'\n" ), next if $matches > 1;
my $val;
# '?' as separator means query, but must have whitespace after it.
if ( "?" eq $sep ) {
- print( $OUT "Option query `$opt?' followed by non-space `$_'\n" ),
+ print( $OUT "Option query '$opt?' followed by non-space '$_'\n" ),
last
if /^\S/;
my ($end) =
"\\" . substr( ")]>}$sep", index( "([<{", $sep ), 1 ); #}
s/^(([^\\$end]|\\[\\$end])*)$end($|\s+)//
- or print( $OUT "Unclosed option value `$opt$sep$_'\n" ), last;
+ or print( $OUT "Unclosed option value '$opt$sep$_'\n" ), last;
( $val = $1 ) =~ s/\\([\\$end])/$1/g;
} ## end else [ if ("?" eq $sep)
if ( $opt_needs_val{$option} && $val_defaulted ) {
my $cmd = ( $CommandSet eq '580' ) ? 'o' : 'O';
print $OUT
-"Option `$opt' is non-boolean. Use `$cmd $option=VAL' to set, `$cmd $option?' to query\n";
+"Option '$opt' is non-boolean. Use '$cmd $option=VAL' to set, '$cmd $option?' to query\n";
next;
} ## end if ($opt_needs_val{$option...
# This term can't get a new tty now. Better luck later.
elsif ($term) {
- &warn("Too late to set IN/OUT filehandles, enabled on next `R'!\n");
+ &warn("Too late to set IN/OUT filehandles, enabled on next 'R'!\n");
}
# Set the filehndles up as they were.
}
# Open file onto the debugger's filehandles, if you can.
- open IN, $in or die "cannot open `$in' for read: $!";
- open OUT, ">$out" or die "cannot open `$out' for write: $!";
+ open IN, $in or die "cannot open '$in' for read: $!";
+ open OUT, ">$out" or die "cannot open '$out' for write: $!";
# Swap to the new filehandles.
reset_IN_OUT( \*IN, \*OUT );
# Terminal doesn't support new TTY, or doesn't support readline.
# Can't do it now, try restarting.
- &warn("Too late to set TTY, enabled on next `R'!\n") if $term and @_;
+ &warn("Too late to set TTY, enabled on next 'R'!\n") if $term and @_;
# Useful if done through PERLDB_OPTS:
$console = $tty = shift if @_;
sub noTTY {
if ($term) {
- &warn("Too late to set noTTY, enabled on next `R'!\n") if @_;
+ &warn("Too late to set noTTY, enabled on next 'R'!\n") if @_;
}
$notty = shift if @_;
$notty;
sub ReadLine {
if ($term) {
- &warn("Too late to set ReadLine, enabled on next `R'!\n") if @_;
+ &warn("Too late to set ReadLine, enabled on next 'R'!\n") if @_;
}
$rl = shift if @_;
$rl;
sub NonStop {
if ($term) {
- &warn("Too late to set up NonStop mode, enabled on next `R'!\n")
+ &warn("Too late to set up NonStop mode, enabled on next 'R'!\n")
if @_;
}
$runnonstop = shift if @_;
$slave_editor = ( $stream =~ /^\|/ );
# Open it up and unbuffer it.
- open( LINEINFO, "$stream" ) || &warn("Cannot open `$stream' for write");
+ open( LINEINFO, "$stream" ) || &warn("Cannot open '$stream' for write");
$LINEINFO = \*LINEINFO;
my $save = select($LINEINFO);
$| = 1;
During startup options are initialized from \$ENV{PERLDB_OPTS}.
You can put additional initialization options I<TTY>, I<noTTY>,
I<ReadLine>, I<NonStop>, and I<RemotePort> there (or use
- `B<R>' after you set them).
+ B<R> after you set them).
B<q> or B<^D> Quit. Set B<\$DB::finished = 0> to debug global destruction.
B<h> Summary of debugger commands.
named Perl I<manpage>, or on B<$doccmd> itself if omitted.
Set B<\$DB::doccmd> to change viewer.
-Type `|h h' for a paged display if this was too hard to read.
+Type '|h h' for a paged display if this was too hard to read.
"; # Fix balance of vi % matching: }}}}
B<b> I<subname> [I<condition>]
Set breakpoint at first line of subroutine.
B<b> I<\$var> Set breakpoint at first line of subroutine referenced by I<\$var>.
-B<b> B<load> I<filename> Set breakpoint on `require'ing the given file.
+B<b> B<load> I<filename> Set breakpoint on 'require'ing the given file.
B<b> B<postpone> I<subname> [I<condition>]
Set breakpoint at first line of subroutine after
it is compiled.
During startup options are initialized from \$ENV{PERLDB_OPTS}.
You can put additional initialization options I<TTY>, I<noTTY>,
I<ReadLine>, I<NonStop>, and I<RemotePort> there (or use
- `B<R>' after you set them).
+ B<R> after you set them).
B<q> or B<^D> Quit. Set B<\$DB::finished = 0> to debug global destruction.
B<h> [I<db_command>] Get help [on a specific debugger command], enter B<|h> to page.
named Perl I<manpage>, or on B<$doccmd> itself if omitted.
Set B<\$DB::doccmd> to change viewer.
-Type `|h' for a paged display if this was too hard to read.
+Type '|h' for a paged display if this was too hard to read.
"; # Fix balance of vi % matching: }}}}
sub end_report {
local $\ = '';
- print $OUT "Use `q' to quit or `R' to restart. `h q' for details.\n";
+ print $OUT "Use 'q' to quit or 'R' to restart. 'h q' for details.\n";
}
=head2 clean_ENV
elsif ( $cmd =~ /^\{/o ) {
if ( $cmd =~ /^\{.*\}$/o && unbalanced( substr( $cmd, 1 ) ) ) {
print $OUT
-"$cmd is now a debugger command\nuse `;$cmd' if you mean Perl code\n";
+"$cmd is now a debugger command\nuse ';$cmd' if you mean Perl code\n";
}
# Properly balanced. Pre-prompt debugger actions.
package DB::fake;
sub at_exit {
- "Debugged program terminated. Use `q' to quit or `R' to restart.";
+ "Debugged program terminated. Use 'q' to quit or 'R' to restart.";
}
package DB; # Do not trace this 1; below!