perl-module-reference
Find module references under a cursor in Perl source.
This crate is the cursor-aware layer above token parsing. It identifies the
module name under the cursor inside use/require statements and can also
look inside use parent/use base argument lists.
Pipeline
perl-module-token-parserfinds the token span.perl-module-referencedecides whether the cursor is on ause,require,parent, orbasereference.perl-module-renameuses this information to plan edits.
Key API
ModuleReferenceKindModuleReferencefind_module_referencefind_module_reference_extendedextract_module_referenceextract_module_reference_extended
Example
use extract_module_reference;
let reference = extract_module_reference;
assert_eq!;