Gnome2:...::Entry(3)

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

πŸ’– Gnome2::GConf::Entry πŸ’–

okay so this is Gnome2::GConf::Entry from the perl docs (it's a perl module page, Gnome2::...::Entry(3), iykyk) and the whole vibe is Container Objects for key/value pairs. that's it, that's the thesis statement πŸŽ€


✨ SYNOPSIS ✨

here's the little scenario, literally just copy it:

$client = Gnome2::GConf::Client->get_default;
$client->notify_add($config_key, sub {
    my ($client, $cnxn_id, $entry) = @_;
    return unless $entry;

    unless ($entry->{value})
    {
      $label->set_text('');
    }
    elsif ($entry->{value}->{type} eq 'string')
    {
      $label->set_text($entry->{value}->{value});
    }
    else
    {
      $label->set_text('!type error!');
    }
  });

like… notice how you're just reaching into $entry->{value} like a normal hashref? that's the whole point bestie, no C API gymnastics required πŸ’…


🌸 DESCRIPTION 🌸

so in C, GConfEntry is this opaque container β€” it holds the key string and the GConfValue that's bound to that key. very "mysterious, don't look inside" energy.

in perl tho? it's a blessed reference to Gnome2::GConf::Entry, and it's just holding these keys for you. open book, main character, no secrets πŸ’–

  • key β€” the key that is being monitored. the little guy we're watching πŸ‘€
  • value β€” a hashref representing a GConfValue (go peek at Gnome2::GConf::Value for the deets), which holds the type and the value of the key. and listen: it may be undef if the key has been unset. not a bug, that's just how it is 😭 also important β€” every method of the C API is replaced by standard perl functions that operate on hashrefs, so no method calls, just hash access. periodt.
  • is_default β€” whether the Gnome2::GConf::Value held by this entry is the default value that the schema attached to the key provides.
  • is_writable β€” whether the key is stored in a writable source inside the GConf database.
  • schema_name β€” the name of the schema key bound to this key.

πŸ‘€ SEE ALSO πŸ‘€


πŸ‘€ SEE ALSO (yes again, she's extra like that) πŸ’…

  • Gnome2::GConf

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

this software is licensed under the LGPL. wanna read the whole thing? go see Gnome2::GConf for a full notice, it's all there bestie 🫢


okay and the receipts at the bottom of the page: this was generated by perl v5.42.0, dated 2025-07-25. slay. go forth and monitor your keys πŸ’œβœ¨πŸ¦‹

πŸ“¦ where this page comes from