Expand description
Perl version compatibility warnings (PL900) Perl version compatibility lint (PL900)
Warns when code uses features not available in the declared Perl version.
§How it works
- First pass over top-level statements: collect declared version (
use vN.NNoruse N.NNN) and any explicituse feature 'X'calls. - Derive the effective feature set from the declared version (bundle
implication —
use v5.36implicitly enables all features available in 5.36). - Second pass (via walker): detect version-gated AST constructs and emit
PL900warnings for those not covered by the effective feature set.
When no version is declared at all, the check emits nothing — undeclared version is ambiguous (the file may be targeting the system Perl).
Functions§
- check_
version_ compat - Check for Perl version compatibility issues.