KiokuD...Shadow(3pm)

πŸ“¦
version 0.57 Β· 3 versions
, in debian bookworm, debian trixie, ubuntu noble, ubuntu questing

πŸ’– NAME πŸ’–

KiokuDB::TypeMap::Shadow β€” bestie, it tries a whole list of KiokuDB::TypeMaps in order, one after the other, no skipping πŸŽ€

✨ VERSION ✨

version 0.57 β€” this is the era we're living in, periodt πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

Like, here's the whole vibe:

KiokuDB->new(
    backend => ...,
    typemap => KiokuDB::TypeMap::Shadow->new(
        typemaps => [
            $first,
            $second,
        ],
    ),
);

She's a wrapper, she takes a list of typemaps, and she just... shadows them in order. Obsessed 🌸

πŸ‘‘ DESCRIPTION πŸ‘‘

Okay so picture this: you wanna do mixin-inheritance-style merging of typemaps β€” like, combining them β€” and the way you do that is by shadowing an ordered list. That's literally what this class is for. Iconic behavior, no cap ✨

Lowkey the main character here is internal use, though: KiokuDB uses this thing to overlay the user typemap on top of the KiokuDB::TypeMap::Default instance that the backend hands over. So the default is chillin' underneath, and your typemap is the moment on top. 🫢

Now, this is not the same as using "includes" in KiokuDB::TypeMap, bestie β€” don't get it twisted. That inclusion is computed symmetrically, kind of like roles do it. This one is an ordered shadowing list. Different energy entirely πŸ’€

fr fr: if you were about to swap one for the other like they're the same thing, they are not. Symmetric β‰  ordered. That's the whole tea. πŸ“

🌈 AUTHOR 🌈

Yuval Kogman <nothingmuch@woobling.org> β€” the icon who made this happen πŸ‘‘

This software is copyright (c) 2014 by Yuval Kogman, Infinity Interactive. πŸŽ€

And it's free software, babes: you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. Slay, that's the license, that's the deal 🧚


cute lil sign-off moment: this page came to you courtesy of perl v5.34.0, dated 2022-05-23, and it was hand-delivered by the User Contributed Perl Documentation crew. mwah πŸ’– bye bestie, go shadow some typemaps πŸ¦‹

πŸ“¦ where this page comes from