Catman...::Multi(3pm)

πŸ“¦
version 1.2025 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Catmandu::Importer::Multi β€” the girlies said "why pick one importer when you can have all of them", and honestly? she ate. Chain multiple importers together πŸ’…

This one's from the User Contributed Perl Documentation, and the manual page itself is titled Catman...::Multi(3pm) β€” section 3pm, aka Perl module territory, iykyk 🫢


✨ SYNOPSIS ✨

Okay so here's the vibe, bestie β€” two ways to build her:

use Catmandu::Importer::Multi;

my $importer = Catmandu::Importer::Multi->new(importers => [
    Catmandu::Importer::Mock->new,
    Catmandu::Importer::Mock->new,
]);

my $importer = Catmandu::Importer::Multi->new(
    'importer1',
    'importer2',
);

# return all the items of each importer in turn
$importer->each(sub {
    # ...
});

Like β€” you can hand her an importers arrayref of actual importer objects, or you can just hand her the names 'importer1', 'importer2' as a plain list. Either way she's serving. 🌸

And then the iconic part:

# return all the items of each importer in turn
$importer->each(sub {
    # ...
});

She goes through each importer, one at a time, and gives you every item from each in turn. No cap. The main character energy of iterating πŸ”₯


πŸŽ€ METHODS πŸŽ€

Okay so here's the tea, and it's lowkey the best part: every Catmandu::Importer is a Catmandu::Iterable, and all its methods are inherited. So whatever moves Catmandu::Iterable has, this one has too. She's not reinventing anything, she's just collecting the whole family πŸ’–

No extra methods of her own listed here β€” she's literally just inheriting the whole Catmandu::Iterable catalogue. Free real estate. πŸ¦‹

That's the whole page, babe β€” short, sweet, and chaining importers like a queen πŸ‘‘πŸŒˆ

✧ο½₯゚: ✧ο½₯゚: mwah :ο½₯゚✧:ο½₯゚✧

This lil page came from perl v5.40.1, dated 2026-01-24, and yes that's the Catman...::Multi(3pm) manual, so jot that down bestie πŸ’œ πŸ“πŸ§š

πŸ“¦ where this page comes from