Cluster(3pm)
β¨ Cluster(3pm) β aka Exporter::Cluster β¨
okay bestie, so this is Cluster(3pm), straight out of the User Contributed Perl Documentation section. pull up a chair, grab a boba, we're doing multiple module imports the cute way π
πΈ NAME πΈ
Exporter::Cluster β it's an extension for easy multiple module imports. yes, multiple, at once, bestie. no more fourteen use lines, we're being efficient today π«Ά
π SYNOPSIS π
okay so scenario one: you're chillin' in your module, and that module is called ModuleName.pm. here's the vibe:
package ModuleName;
require Exporter::Cluster;
@ISA = qw( Exporter::Cluster );
%EXPORT_CLUSTER = ( MODULE_1 => ARGS_1,
MODULE_2 => ARGS_2,
... => ... );
and then, in all the other files that wanna use ModuleName, you literally just go:
use ModuleName;
that's it. that's the whole move. β¨
Every single module you listed inside %EXPORT_CLUSTER becomes available to the module that does use ModuleName β and yes, they get augmented by the import argument list first, if there is one. iykyk π
π§ DESCRIPTION π§
so, what's the tea? Exporter::Cluster exists so you can build a binding package β like, one single package whose whole personality is letting a bunch of other packages get imported into the symbol table with just one lil use command. one and done, iconic behavior honestly π
where did it come from? the observation of a general trend, bestie: Perl packages keep growing in complexity as new tech gets developed and Perl interfaces get designed to interact with that tech. it's giving "everything is connected and everything is huge" π
now listen β this is NOT a general use module! read that again, fr fr. it was designed mainly for developers who are trying to implement a sane interface to their work, while still keeping up good coding practices like code seperation and modular design. so if that's your situation, slay, this is for you. if notβ¦ this probably isn't your moment π
π BUGS π
No known bugs at this time.
(vibe check passed β the bug list is empty, we love a clean record)
π AUTHOR π
D. Hageman <dhageman@dracken.com>
π SEE ALSO π
Exporterβ the og. go say hi π«Ά
π COPYRIGHT AND LICENSE π
Copyright (c) 2002-2003 D. Hageman (Dracken Technologies). All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
aaand that's the whole page, bestie π this was Cluster(3pm) from perl v5.38.2, dated 2024-02-17 β go forth and cluster your imports responsibly ππΈβ¨
π¦ where this page comes from
- ubuntu noble: libexporter-cluster-perl 0.31-0ubuntu4
- ubuntu resolute: libexporter-cluster-perl 0.31-0ubuntu4
- ubuntu stonking: libexporter-cluster-perl 0.31-0ubuntu4
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms