Glib::VariantDict(3)
π Glib::VariantDict β bestie edition π
okay so real talk: this is Glib::VariantDict, straight out of the User Contributed Perl Documentation collection, and it gives you all the utilities for dealing with the GVariantDict mutable interface to GVariant dictionaries. you know how GVariant dicts are normally all "no β i'm immutable, i'm booked and busy"? yeah well GVariantDict is the mutable era. glow-up behavior only. β¨
πΈ NAME πΈ
Glib::VariantDict β Utilities for dealing with the GVariantDict mutable interface to GVariant dictionaries. that's the whole vibe. she edits dicts. iconic. π
π¦ HIERARCHY π¦
so the family tree is giving very much:
Glib::Boxed
+----Glib::VariantDict
that's it, that's the lineage. Glib::VariantDict is a Glib::Boxed girly, no cap. π
β¨ METHODS β¨
π variantdict = Glib::VariantDict->new ($from_asv)
makes you a brand new dict, bestie π«Ά
$from_asv(Glib::Variant) β the starting variant you're building from.
Since: glib 2.40 β she's been around, she's not new here.
π boolean = $dict->contains ($key)
asks the dict "do you have this key or not" and gets a straight yes/no answer. honestly so refreshing. π
$key(string) β the key you're checking on.
Since: glib 2.40
π variant = $dict->end
wraps it up, closes the dict out, and hands you back a variant. the finale. the last bow. π¬
Since: glib 2.40
π $dict->insert_value ($key, $value)
puts a key + value pair into the dict. dropping it in, no thoughts, just vibes. π
$key(string) β the key.$value(Glib::Variant) β the value going in with it.
Since: glib 2.40
π variant = $dict->lookup_value ($key, $expected_type)
digs up the value for a key and gives it back to you as a variant. you do gotta tell it what type you're expecting tho, so be honest with her. π
$key(string) β which key you want.$expected_type(Glib::VariantType) β the type you're expecting back.
Since: glib 2.40
π boolean = $dict->remove ($key)
yeets a key out of the dict and tells you a boolean about how it went. breaking up with a key, gently. π
$key(string) β the key getting removed.
Since: glib 2.40
π₯ SEE ALSO π₯
go read these next, i'm obsessed, iykyk:
GlibGlib::BoxedGlib::Variant
π COPYRIGHT π
Copyright (C) 2003-2011 by the gtk2-perl team.
This software is licensed under the LGPL. See Glib for a full notice. π
mwah π that's the whole page, no notes. this lil doc came to you from the User Contributed Perl Documentation, shipped with perl v5.42.0, dated 2023-09-05 β and the page itself is Glib::VariantDict(3). go be a mutable dict main character, bestie. π§π
π¦ where this page comes from
- opensuse-leap 16.0: perl-Glib 1.3294-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Glib 1.3294-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Glib 1.3294-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: perl-Glib 1.3294-160000.2.2 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms