Skip to main content

Module value_shape_inferrer

Module value_shape_inferrer 

Source
Expand description

Semantic analysis, symbol extraction, and type inference. Lightweight value-shape inference from constructor calls, bless, and $self. Lightweight value-shape inference from Perl AST patterns.

Walks the AST to infer [ValueShape] approximations for variables based on common Perl idioms:

Perl patternInferred shape
Foo->new(...)Object { "Foo", High }
bless $ref, 'Pkg'Object { "Pkg", Low }
$self in method bodyObject { <enclosing package>, Medium }
unknownUnknown

The inferrer does not perform full type inference — it recognises syntactic patterns and assigns conservative shapes.

Structs§

ValueShapeInferrer
Inferrer that walks an AST to produce (EntityId, ValueShape) pairs.