Expand description
Parser utilities and helpers. Tokenization utilities shared by parser-facing entry points.
Helpers in this module identify Perl data-section markers (__DATA__ and
__END__) using lexer tokens, so callers can safely split executable code
from trailing payload without matching markers embedded in strings,
heredocs, or POD content.
Functionsยง
- code_
slice - Helper to get the code portion of text (before DATA/END)
- find_
data_ marker_ byte Deprecated - Find the byte offset of a DATA or END marker in the source text. Returns the byte offset of the start of the marker line, or None if not found.
- find_
data_ marker_ byte_ lexed - Find the byte offset of a DATA or END marker in the source text. Uses the lexer to avoid false positives in heredocs/POD. Returns the byte offset of the start of the marker, or None if not found.
- split_
code_ and_ data - Split source text into executable code and optional trailing data section.