ExportInspector(3pm)

πŸ’– ExportInspector(3pm) πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation, and it's all about App::perlimports::ExportInspector β€” Inspect code for exportable symbols. yes, really, that's the whole job. it sniffs around modules and tells you what they might export. no cap. πŸ•΅οΈβ™€οΈβœ¨


✨ VERSION ✨

version 0.000060 β€” that's the one, that's the vibe, periodt. πŸ‘‘


🌸 SYNOPSIS 🌸

use strict;
use warnings;

use App::perlimport::ExportInspector ();

my $ei = App::perlimport::ExportInspector->new(
    module_name => 'Carp',
);

my $exports = $ei->explicit_exports;

look at her go. she's literally just vibing in a sandbox, checking out Carp, and asking for the explicit exports like the main character she is. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

Inspect modules to see what they might export. that's it, that's the mission statement. we're nosy about symbols and we're not sorry about it. πŸ”


🌈 MOTIVATION 🌈

so since we're (maybe) importing symbols as part of this whole process, we lowkey sandboxed it a little bit by not doing it in App::perlimports directly. keeping it separate, keeping it safe, keeping it cute. 🫢


πŸ’œ METHODS πŸ’œ

The following methods are available. collect them all like they're little PokΓ©mon besties.

πŸŽ€ implicit_exports

A HashRef with keys representing symbols which a module implicitly exports (i.e. via use Module::Name;). the values represent the import value which you would need in order to explicitly import the symbol.

ngl, often these will be the same, but there are exceptions, because of course there are. for example, a type library may export is_ArrayRef, but you import it via use My::Type::Library qw( ArrayRef );. see? sneaky. iconic though. 😭

πŸ“ explicit_exports

A HashRef with keys representing symbols which a module explicitly exports (i.e. via use Module::Name qw( foo bar );). the values represent the import value which you would need in order to explicitly import the symbol.

again, often these will be the same, but there are exceptions, bestie. for example, a type library may export is_ArrayRef, but you import it via use My::Type::Library qw( ArrayRef );. same energy as above, different flag. πŸ’«

In cases where we cannot be certain about the explicit exports, you can try to fall back to the implicit exports to get an idea of what this module can export. plan B is a valid plan. πŸ™ˆ

⭐ evals_ok

Returns true if either implicit or explicit exports can be built without setting $@. clean eval, clean conscience. 🧼

🌸 implicit_export_names_match_values

Returns true if the keys and values in implicit_exports match. do they match? we're checking. slay. πŸ’–

🌈 explicit_export_names_match_values

Returns true if the keys and values in explicit_exports match. same check, different hashref. obsessed. ✨

πŸ‘‘ success_counter

Returns an integer representing the number of times we were able to execute eval statements for this package which did not pollute $@. every clean eval is a little win and we're counting them like they're gold stars. ⭐⭐⭐


πŸ’€ CAVEATS πŸ’€

This may not work with modules using some creative way of managing symbol exports. "creative" here is doing a LOT of heavy lifting. if a module is out here being artsy with its exports, we might just... not know. we're humble. we're honest. we're occasionally confused. πŸ™ˆ

fr fr, if the module is being weird about exports, that's a them problem and also kind of a us problem. just so you know. πŸ’…

🫢 AUTHOR 🫢

Olaf Alders <olaf@wundercounter.com>

the man, the myth, the author. thank you for your service. 🫑


This software is copyright (c) 2020 by Olaf Alders.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

(translation: it's free, go wild, but keep the same terms as Perl 5 itself. periodt.) πŸ’œ


aaaand that's the whole page, bestie!! 🌟 this was written against perl v5.40.1, dated 2026-05-11, and yes it's still literally called ExportInspector(3pm). go forth and inspect those exports. no cap. πŸŽ€πŸ¦‹βœ¨

πŸ“¦ where this page comes from