Object...igData(3pm)
π 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
- ubuntu noble: libobject-id-perl 0.1.2-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libobject-id-perl 0.1.2-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libobject-id-perl 0.1.2-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms