Object...igData(3pm)

πŸ“¦
version 0.1.2 Β· 5 versions
, in ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

Object::ID::ConfigData β€” it's the config situation for Object::ID, bestie. That's the whole vibe.

So real quick, this page lives in the User Contributed Perl Documentation section (the (3pm) energy, yk), and it's literally all about holding Object::ID's config data and letting you poke at it programmatically. πŸŽ€


✨ SYNOPSIS ✨

Okay so here's the whole vibe in code form, no cap:

use Object::ID::ConfigData;
$value = Object::ID::ConfigData->config('foo');
$value = Object::ID::ConfigData->feature('bar');

@names = Object::ID::ConfigData->config_names;
@names = Object::ID::ConfigData->feature_names;

Object::ID::ConfigData->set_config(foo => $new_value);
Object::ID::ConfigData->set_feature(bar => $new_value);
Object::ID::ConfigData->write;  # Save changes

🌸 DESCRIPTION 🌸

This module holds the configuration data for the Object::ID module. It also hands you a whole programmatic interface for getting or setting that configuration data. Iconic, honestly. 🫢

But listen β€” to actually make changes you have to have write access to the Object::ID::ConfigData module itself, and you should attempt to understand the repercussions of your actions before you go changing stuff. Like, fr, understand the consequences first. πŸ’…


πŸ‘‘ METHODS πŸ‘‘

πŸ¦‹ config($name)

Hand it a string argument and it gives you back the value of the configuration item by that name. If no such item exists? You get undef. That's it, that's the whole thing.

πŸ¦‹ feature($name)

Same deal but for features β€” give it a string argument and it returns the value of the feature by that name, or undef if no such feature exists.

πŸ¦‹ set_config($name, $value)

Sets the configuration item with the given name to the given value. The value can be any Perl scalar that'll serialize correctly using Data::Dumper β€” so that includes references, objects (usually), and complex data structures. What it probably does not include is transient things like filehandles or sockets. So no, don't try to shove a socket in there. 😭

πŸ¦‹ set_feature($name, $value)

Sets the feature with the given name to the given boolean value, and the value gets converted to 0 or 1 automatically for you. Convenient, slay.

πŸ¦‹ config_names()

Returns a list of all the names of config items currently defined in Object::ID::ConfigData β€” or, in scalar context, the number of items. Two moods, one method. ✨

πŸ¦‹ feature_names()

Returns a list of all the names of features currently defined in Object::ID::ConfigData, or in scalar context, the number of features.

πŸ¦‹ auto_feature_names()

Returns a list of all the names of features whose availability is dynamically determined β€” or in scalar context, the number of such features. Important detail: it does not include such features that have later been set to a fixed value. Once you've locked it down, it's out of this list. periodt. πŸ’…

πŸ¦‹ write()

Commits any changes from set_config() and set_feature() to disk. Requires write access to the Object::ID::ConfigData module β€” like we said earlier, no write access, no saving. πŸ’Ύ


🧚 AUTHOR 🧚

Object::ID::ConfigData was automatically created using Module::Build. Module::Build was written by Ken Williams, but he holds no authorship claim or copyright claim to the contents of Object::ID::ConfigData. So like, credit where it's due but also not his content, iykyk. 🌈


okay bestie that's the whole page, hope it ate πŸ’–

And for the lil sign-off: this was rendered from perl v5.36.0, dated 2022-06-16. Go off, queen. πŸ‘‘βœ¨

πŸ“¦ where this page comes from