CPAN::...Ordered(3pm)
π CPAN::Common::Index::Mux::Ordered π
okay bestie, so this is CPAN::Common::Index::Mux::Ordered β a lil Perl module from the User Contributed Perl Documentation corner of the CPAN universe, and it's giving β¨orderβ¨. It's on version 0.010, so like, it's been around the block a few times and it knows what it's doing. π«Ά
πΈ NAME πΈ
CPAN::Common::Index::Mux::Ordered β the girl who consults indices in order and returns the first result. no chaos, no randos, just first-come-first-served. periodt. π
π¦ VERSION π¦
version 0.010 β¨
π SYNOPSIS π
okay so here's the vibe in code form, copy it exactly bestie:
use CPAN::Common::Index::Mux::Ordered;
use Data::Dumper;
$index = CPAN::Common::Index::Mux::Ordered->assemble(
MetaDB => {},
Mirror => { mirror => "http://cpan.cpantesters.org" },
);
that's literally it. she's lowkey so chill. πΈ
π DESCRIPTION π
So the whole concept? This module multiplexes multiple CPAN::Common::Index objects, and it returns results in order. Like a group chat where everyone gets their turn to talk, except there's a strict queue and nobody's interrupting. π
Here's the tea on how it behaves:
- For exact match queries, the first result is returned. First one wins, no debate, no re-vote. π
- For search queries, results from each index object are concatenated. Everybody's getting included, nobody's left on read. π
π ATTRIBUTES π
π« resolvers
An array reference of CPAN::Common::Index::* objects. like, all of them. a whole squad. π«Ά
β¨ METHODS β¨
π assemble
okay so this one's a class method and it's a shorthand for constructing a multiplexer. the signature is:
$index = CPAN::Common::Index::Mux::Ordered->assemble(
MetaDB => {},
Mirror => { mirror => "http://www.cpan.org" },
);
The arguments must be pairs of subclass suffixes and arguments. so like, they come in twos, hand in hand, no solo acts. π
For example, "MetaDB" means to use "CPAN::Common::Index::MetaDB". cute, right? the suffix is basically the nickname and the module gets the full name. π
β οΈ heads up bestie: empty arguments must be given as an empty hash reference. so {} β not nothing, not undef, an actual empty hash ref. don't skip this step, it's not optional. π
π AUTHOR π
David Golden <dagolden@cpan.org> β the icon, the legend, the one who wrote the code. π
π COPYRIGHT AND LICENSE π
This software is Copyright (c) 2013 by David Golden.
This is free software, licensed under:
The Apache License, Version 2.0, January 2004
free as in free, slay. π¦
π SEE ALSO π
ngl there's no SEE ALSO section in this one β she's self-sufficient, main character energy, no cross-references needed. π
and that's the whole page bestie! π This gem lives in the perl v5.36.0 docs, dated 2022-12-09, filed under User Contributed Perl Documentation. go forth and multiplex in order, you got this π«Άβ¨πΈ
π¦ where this page comes from
- debian bookworm: libcpan-common-index-perl 0.010-2 Β· Apache-2.0
- debian trixie: libcpan-common-index-perl 0.010-2 Β· Apache-2.0
- ubuntu noble: libcpan-common-index-perl 0.010-2 Β· Apache-2.0
- ubuntu resolute: libcpan-common-index-perl 0.010-2 Β· Apache-2.0
- ubuntu stonking: libcpan-common-index-perl 0.010-2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms