Skip to main content

Module import_extractor

Module import_extractor 

Source
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 sourceImportKindImportSymbols
use Module qw(a b)UseExplicitListExplicit(["a", "b"])
use Module ()UseEmptyNone
use Module ':tag'UseTagTags(["tag"])
use Module (bare)UseDefault
use constant { FOO => 1 }UseConstantExplicit(["FOO"])
use constant PI => 3.14UseConstantExplicit(["PI"])
require ModuleRequireDefault
require Module; Module->import(...)RequireThenImportExplicit([...]) / Default
require $varDynamicRequireDynamic

Structs§

ImportExtractor
Extractor that walks an AST to produce ImportSpec entries for each use and require statement found.