Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Conflict-marker diagnostic falsely rejects heredoc content

Open
#1,434 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
java, perl
Domain
compilers

Research direction

Start with the conflict-marker diagnostic introduced by commit 2d3c36bb235 and reproduce the minimal heredoc case, then inspect the parser handling around CONFLICT_MARKER. Use test.pl from the Text::FormatTable v1.03 reproduction and the existing conflict-marker diagnostic tests as checks. Done means heredoc and quoted-string marker text compiles while genuine source markers still produce diagnostics on both JVM and interpreter backends.

Written by the indexing model from the issue text.

Description

area:cpan-port area:parser bug

Summary

PerlOnJava incorrectly reports a version-control conflict marker when a Perl heredoc contains a legitimate run of = characters. This is a parser regression that breaks Text::FormatTable v1.03.

CPAN evidence

  • CPAN run: 20260918-141920-96054
  • Distribution: Text::FormatTable v1.03
  • System Perl: PASS — 5 tests
  • PerlOnJava: FAIL during compilation
  • Both JVM and interpreter backends reproduce the failure

The upstream test contains a heredoc with expected table output. One line consists of a run of equals signs:

my $shouldbe = <<'END';
 a| b     c
=================
...
END

PerlOnJava aborts before the test can run:

Version control conflict marker at test.pl line 21, near "============="

The same test passes under standard Perl.

Root cause

The conflict-marker diagnostic added by commit 2d3c36bb2355 treats the equals-sign content inside the heredoc as a CONFLICT_MARKER token. The diagnostic is intended for actual source-level merge markers such as a standalone ======= line, but it is being applied to literal heredoc content where the text must remain part of the string.

The failure is therefore independent of Text::FormatTable behavior; the module's test data happens to contain the triggering text.

Reproduction

Run the Text::FormatTable v1.03 test suite with PerlOnJava. The test.pl program fails at the heredoc line containing the table rule. A minimal equivalent reproducer is:

my $text = <<'END';
=======
END

This must compile as a string literal and must not raise a conflict-marker diagnostic. The archived CPAN run reproduces the failure on both execution backends.

Expected behavior

Conflict-marker diagnostics should not inspect or tokenize the contents of quoted strings, including heredocs. Literal sequences of seven or more <, =, or > characters inside a string must remain string data.

Actual source-level conflict markers should continue to receive the intended diagnostic when they occur in a context where Perl treats them as source rather than string content.

Requested fix

  • Restrict conflict-marker detection to valid source-level marker positions outside quoted strings and heredocs.
  • Preserve the existing diagnostics for genuine conflict markers.
  • Add a focused parser regression test covering equals-sign runs in heredocs and quoted strings.
  • Rerun Text::FormatTable v1.03 and the existing conflict-marker diagnostic tests on both JVM and interpreter backends.
Dominant language
Perl
Stars
64
Forks
6
Avg merge
5h 38m
Merged PRs (30d)
170

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fglock/PerlOnJava

All issues in fglock/PerlOnJava

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.