Mouse::Exporter(3pm)
πΈ NAME πΈ
okay bestie, this is Mouse::Exporter(3pm) β a User Contributed Perl Documentation page β and it's the manual for Mouse::Exporter, whose whole gig is: make an import() and unimport() just like Mouse.pm. periodt. π
β¨ VERSION β¨
This doc is literally describing Mouse version v2.6.2, no cap.
π SYNOPSIS π
the setup is giving exactly this, so here's the code in all its glory:
package MyApp::Mouse;
use Mouse ();
use Mouse::Exporter;
Mouse::Exporter->setup_import_methods(
as_is => [ 'has_rw', 'other_sugar', \&Some::Random::thing ],
also => 'Mouse',
);
sub has_rw {
my $meta = caller->meta;
my ( $name, %options ) = @_;
$meta->add_attribute(
$name,
is => 'rw',
%options,
);
}
# then later ...
package MyApp::User;
use MyApp::Mouse;
has 'name';
has_rw 'size';
thing;
no MyApp::Mouse;
π DESCRIPTION π
This module is literally about encapsulating the exporting of sugar functions in a Mouse.pm-like manner. It does that by building custom import and unimport methods for your module, based on a spec you provide. iconic behavior, honestly. β¨
important note, bestie: Mouse::Exporter does not provide the with_meta option. But you can easily get the metaclass by using caller->meta, exactly as SYNOPSIS shows. no stress. π«Ά
π οΈ METHODS π οΈ
here are the method signatures, and yes, every detail is kept:
setup_import_methods( ARGS )build_import_methods( ARGS ) -> (\&import, \&unimport)
π SEE ALSO π
go peek at Moose::Exporter, bestie. iykyk. π¦
okay bye ily π β this page comes from perl v5.42.2, dated 2026-04-21, and it's the Mouse::Exporter(3pm) page. mwah πβ¨
π¦ where this page comes from
- alpine 3.24: perl-mouse-doc 2.6.2-r0 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms