pub struct ExportSymbolExtractor;Expand description
Export symbol extractor for Exporter-based Perl modules.
This extractor walks the AST to:
- Detect if a module uses Exporter (via one of four patterns)
- Parse
@EXPORT,@EXPORT_OK, and%EXPORT_TAGSassignments
Implementations§
Source§impl ExportSymbolExtractor
impl ExportSymbolExtractor
Sourcepub fn extract(ast: &Node) -> Option<ExportInfo>
pub fn extract(ast: &Node) -> Option<ExportInfo>
Extract export information from an AST.
Returns None only when the module has neither Exporter inheritance
(use Exporter;, use parent 'Exporter';, use base 'Exporter';,
or @ISA = qw(Exporter ...);) nor a custom sub import { ... } definition.
Returns Some(ExportInfo) with empty sets otherwise; modules whose only
signal is a custom sub import get custom_import: true and
confidence: Low on the returned info.
Auto Trait Implementations§
impl Freeze for ExportSymbolExtractor
impl RefUnwindSafe for ExportSymbolExtractor
impl Send for ExportSymbolExtractor
impl Sync for ExportSymbolExtractor
impl Unpin for ExportSymbolExtractor
impl UnsafeUnpin for ExportSymbolExtractor
impl UnwindSafe for ExportSymbolExtractor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more