summaryrefslogtreecommitdiff
path: root/lib/perl5db.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2022-03-21 14:10:16 -0600
committerKarl Williamson <khw@cpan.org>2022-03-26 19:31:50 -0600
commit3fc5cc3eec542ccf9668b6afd3b2919ef5a3fb25 (patch)
treebc0a71bb9bad8901c8d019444964c8220656a51d /lib/perl5db.pl
parent25aae7042e616791bf97b3ce994614f227baaab8 (diff)
downloadperl-3fc5cc3eec542ccf9668b6afd3b2919ef5a3fb25.tar.gz
Perl5DB: Rmv ASCII dependency
Diffstat (limited to 'lib/perl5db.pl')
-rw-r--r--lib/perl5db.pl11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/perl5db.pl b/lib/perl5db.pl
index c4186ccd2e..9fab81d356 100644
--- a/lib/perl5db.pl
+++ b/lib/perl5db.pl
@@ -2116,6 +2116,9 @@ sub _DB__handle_c_command {
return;
}
+my $sub_twice = chr utf8::unicode_to_native(032);
+$sub_twice = $sub_twice x 2;
+
sub _DB__handle_forward_slash_command {
my ($obj) = @_;
@@ -2179,7 +2182,7 @@ sub _DB__handle_forward_slash_command {
if ($dbline[$start] =~ m/$pat/i) {
if ($client_editor) {
# Handle proper escaping in the client.
- print {$OUT} "\032\032$filename:$start:0\n";
+ print {$OUT} "$sub_twice$filename:$start:0\n";
}
else {
# Just print the line normally.
@@ -2257,7 +2260,7 @@ sub _DB__handle_question_mark_command {
if ($dbline[$start] =~ m/$pat/i) {
if ($client_editor) {
# Yep, follow client editor requirements.
- print $OUT "\032\032$filename:$start:0\n";
+ print $OUT "$sub_twice$filename:$start:0\n";
}
else {
# Yep, just print normally.
@@ -2718,7 +2721,7 @@ sub _cmd_l_range {
# If we're running under a client editor, force it to show the lines.
if ($client_editor) {
- print {$OUT} "\032\032$filename:$i:0\n";
+ print {$OUT} "$sub_twice$filename:$i:0\n";
$i = $end;
}
# We're doing it ourselves. We want to show the line and special
@@ -3628,7 +3631,7 @@ sub _DB__grab_control
if ($client_editor) {
# Tell the editor to update its position.
- $self->position("\032\032${DB::filename}:$line:0\n");
+ $self->position("$sub_twice${DB::filename}:$line:0\n");
DB::print_lineinfo($self->position());
}