Expand description
Semantic analysis, symbol extraction, and type inference.
Import specification extraction for static use statements.
Import specification extractor for use and require statements.
Walks the AST to extract [ImportSpec] entries from Perl use and require
statements, classifying each import site by its syntactic shape
([ImportKind]) and symbol selection policy ([ImportSymbols]).
§Supported Patterns
| Perl source | ImportKind | ImportSymbols |
|---|---|---|
use Module qw(a b) | UseExplicitList | Explicit(["a", "b"]) |
use Module () | UseEmpty | None |
use Module ':tag' | UseTag | Tags(["tag"]) |
use Module (bare) | Use | Default |
use constant { FOO => 1 } | UseConstant | Explicit(["FOO"]) |
use constant PI => 3.14 | UseConstant | Explicit(["PI"]) |
require Module | Require | Default |
require Module; Module->import(...) | RequireThenImport | Explicit([...]) / Default |
require $var | DynamicRequire | Dynamic |
Structs§
- Import
Extractor - Extractor that walks an AST to produce
ImportSpecentries for eachuseandrequirestatement found.