News for hackers. Stuff that matters.

Show HN: perl-lsp – annotation free static analysis for Perl

https://github.com/tree-sitter-perl/perl-lsp

Built in Rust on top of ts-parser-perl and tower-lsp. Witness bags with graph traversal (value edges, call flow edges).

How it works: - builds witnesses and scopes by walking the parse tree. Fully known values get concrete types, otherwise they get an edge pointing to the last witness we have for this symbol - a worklist runs to a fixed point: reducers fold each symbol's witnesses and chase edges. At this point, the witness bag is complete and ready to use - all downstream features are queries into the bag, following along the graph edges that are relevant

Extensible - you can bring your own Rhai plugin to shortcut common patterns (exporters and OOP frameworks), or even add new types of definitions (worker tasks and web routes).

The build/query timing distinction with edges lets you late bind types, which is duly similar to how Perl itself works: `Foo->new` isn't known if it's the constructor for Foo or calling a method on the sub name `Foo`; late binding lets you make that call after the worklist folds.

( 3 comments | 3 points | on HN )
Re:Show HN: perl-lsp – annotation free static analysis for Perl by atmanactive on Tuesday June 23, 2026 @04:28PM (#48650900)
This looks awesome. Thank you!
Re:Show HN: perl-lsp – annotation free static analysis for Perl by rabbiveesh on Wednesday June 24, 2026 @08:01AM (#48658441)
Thanks! I'm very actively developing it right now so if there are feature requests please open issues on github
Re:Show HN: perl-lsp – annotation free static analysis for Perl by sanket-thakkar on Sunday June 28, 2026 @10:57AM (#48707883)
That's amazing to know. it's good to have such tools with some customization choice options. good initiative.