Skip to main content

Module util

Module util 

Source
Expand description

Parser utilities and helpers. Utility functions for the Perl parser

Functions§

code_slice
Helper to get the code portion of text (before DATA/END)
find_data_marker_byteDeprecated
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.