summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2018-03-12 12:20:23 +0000
committerDavid Mitchell <davem@iabyn.com>2018-03-20 07:59:26 +0000
commit5a92c67754c45dd4fc2ae77eee75f6fcaed2e2b1 (patch)
treea88ee3f4da9e41fe10c4ec5106ded83fc6d0684c /lib
parentabba070e941a4be08b2532b32d439a9038b0908e (diff)
downloadperl-5a92c67754c45dd4fc2ae77eee75f6fcaed2e2b1.tar.gz
Deparse.pm: add some code comments
Diffstat (limited to 'lib')
-rw-r--r--lib/B/Deparse.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/B/Deparse.pm b/lib/B/Deparse.pm
index 18ac23854d..5f3a591dad 100644
--- a/lib/B/Deparse.pm
+++ b/lib/B/Deparse.pm
@@ -5556,7 +5556,9 @@ sub double_delim {
}
}
+# Escape a characrter.
# Only used by tr///, so backslashes hyphens
+
sub pchr { # ASCII
my($n) = @_;
if ($n == ord '\\') {
@@ -5591,6 +5593,9 @@ sub pchr { # ASCII
}
}
+# Convert a list of characters into a string suitable for tr/// search or
+# replacement, with suitable escaping and collapsing of ranges
+
sub collapse {
my(@chars) = @_;
my($str, $c, $tr) = ("");