Gnome2:...::Value(3)
π 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 π
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
- fedora 43: perl-Gnome2-GConf 1.047-18.fc43 Β· LicenseRef-Callaway-LGPLv2+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms