Gnome2:...::Value(3)

πŸ“¦
version 1.047 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Gnome2::GConf::Value β€” bestie, it's an opaque datatype for generic values. That's the whole vibe ✨


🌸 SYNOPSIS 🌸

$client = Gnome2::GConf::Client->get_default;
$client->set($config_key,
    {
      type  => 'string',
      value => 'Hello, World',
    });
print "The Meaning of Life." if ($client->get($another_key)->{value} == 42);

✨ DESCRIPTION ✨

Okay so GConfValue? It's a dynamic type, kind of like GValue's cousin at the same family reunion 🫢 β€” it represents a value that can be pulled out of or stashed into the configuration database, and it holds both the value bound to a key and its type.

In perl land, it's a hashref with these keys, periodt:

🌟 type

The type of the data, no cap. The fundamental types are 'string', 'int', 'float' and 'bool'. Lists? Handled by passing an arrayref as the payload of the value key, like so:

$client->set($key, { type => 'string', value => 'some string' });
$client->set($key, { type => 'float',  value => 0.5           });
$client->set($key, { type => 'bool',   value => FALSE         });
$client->set($key, { type => 'int',    value => [0..15]       });

Pairs get their own special treatment πŸ’… you use the special type 'pair' and, instead of the value key, you pass the car and the cdr keys β€” each one holding a hashref that itself represents a GConfValue:

$client->set($key, {
                type => 'pair',
                car  => { type => 'string', value => 'some string' },
                cdr  => { type => 'int',    value => 42            },
        });

Why tho? Because pairs might have different types, bestie. Lists, on the other hand, are all the same type. It's giving "matched set" energy πŸŽ€

🌟 value

The payload β€” it's holding the actual value of type type. This one is only used for fundamental types (scalars or lists). Not for pairs, okay? πŸ™ˆ

🌟 car, cdr

Special keys, and they must be used only when you're working with the 'pair' type. Like, only then. Don't be out here using them for anything else 🫠


🌈 SEE ALSO 🌈

Gnome2::GConf(3pm), Gnome2::GConf::Entry(3pm), Gnome2::GConf::Schema(3pm), Gnome2::GConf::ChangeSet(3pm).


πŸ’… METHODS πŸ’…

integer = $value_a->compare ($value_b)

  • $value_b (value)

Since: gconf 2.13

string = $value->to_string


πŸ‘‘ SEE ALSO πŸ‘‘

Gnome2::GConf


Copyright (C) 2003-2006 by the gtk2-perl team.

This software is licensed under the LGPL. See Gnome2::GConf for a full notice.


And that's the whole page, bestie β€” it's perl v5.42.0, dated 2025-07-25, from the Gnome2:...::Value(3) manual page. Slay, go configure something πŸ’–βœ¨

πŸ“¦ where this page comes from