summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dist/B-Deparse/Deparse.pm3
-rw-r--r--dist/B-Deparse/t/deparse.t10
2 files changed, 13 insertions, 0 deletions
diff --git a/dist/B-Deparse/Deparse.pm b/dist/B-Deparse/Deparse.pm
index e50ea066d4..b62976d054 100644
--- a/dist/B-Deparse/Deparse.pm
+++ b/dist/B-Deparse/Deparse.pm
@@ -972,6 +972,9 @@ sub indent {
}
$line = substr($line, 1);
}
+ if (index($line, "\f") > 0) {
+ $line =~ s/\f/\n/;
+ }
if (substr($line, 0, 1) eq "\f") {
$line = substr($line, 1); # no indent
} else {
diff --git a/dist/B-Deparse/t/deparse.t b/dist/B-Deparse/t/deparse.t
index eb87bfd374..daa611d61f 100644
--- a/dist/B-Deparse/t/deparse.t
+++ b/dist/B-Deparse/t/deparse.t
@@ -185,6 +185,16 @@ sub :::::: {
}
EOCODG
+# [perl #117311]
+$a = `$^X $path "-MO=Deparse,-l" -e "map{ eval(0) }()" 2>&1`;
+$a =~ s/-e syntax OK\n//g;
+is($a, <<'EOCODH', "[perl #117311] [PATCH] -l option ('#line ...') does not emit ^Ls in the output");
+#line 1 "-e"
+map {
+#line 1 "-e"
+eval 0;} ();
+EOCODH
+
# [perl #33752]
{
my $code = <<"EOCODE";