Expand description
Semantic analysis, symbol extraction, and type inference. Export symbol extraction for Exporter-based Perl modules. Export symbol extraction for Exporter-based Perl modules
This module provides functionality to extract export information from Perl modules
that use the Exporter framework. It detects four inheritance patterns and parses
the @EXPORT, @EXPORT_OK, and %EXPORT_TAGS arrays.
§Exporter Detection Patterns
A module is considered an Exporter if it matches any of:
use Exporter;(Use node with module=“Exporter” and empty args — bare form)use Exporter 'import';(Use node with module=“Exporter” and args containing “import”)use parent 'Exporter';oruse parent qw(Exporter);(Use node with module=“parent”)use base 'Exporter';oruse base qw(Exporter);(Use node with module=“base”)our @ISA = qw(Exporter);(VariableDeclaration with @ISA array containing “Exporter”)@ISA = qw(Exporter);(bare Assignment with @ISA array containing “Exporter”)
§Export Array Format
The parser supports all Perl qw() delimiters:
@EXPORT = qw(foo bar)— parentheses@EXPORT = [qw(foo bar)]— brackets@EXPORT = qw<foo bar>— angle brackets@EXPORT = qw/foo bar/— slashes@EXPORT = qw|foo bar|— pipes
Both our @EXPORT = ... (VariableDeclaration) and bare @EXPORT = ... (Assignment)
forms are extracted.
Structs§
- Export
Info - Information extracted from an Exporter-based module.
- Export
Symbol Extractor - Export symbol extractor for Exporter-based Perl modules.
Enums§
- Exporter
Detector - Detection method for Exporter inheritance.