Cluster(3pm)

πŸ“¦
version 0.31 Β· 2 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

✨ 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 (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