perl-module-import
Parse the leading shape of use and require lines.
This crate turns a single source line into a structured import head with stable byte offsets and dispatch semantics. Use it when you need to know what the statement is before you decide how to rewrite or inspect it.
Pipeline
perl-module-token-corehandles token spans.perl-module-importclassifies the leading statement and token.perl-module-import-matchgives you a boolean line check when you do not need the full parse.perl-module-referenceandperl-module-renameuse the parse result to find or rewrite imports.
Key API
LoadTimingImportBehaviorDispatchSemanticsRequireFormModuleImportKindModuleImportHeadparse_module_import_head
Example
use ;
let head = parse_module_import_head;
assert!;
assert_eq!;