DBM::D...figData(3pm)
β¨ NAME β¨
DBM::Deep::ConfigData β the whole entire configuration situation for DBM::Deep, bestie π
(also, hi, this page is part of the User Contributed Perl Documentation β DBM::D...figData(3pm) if you're keeping score π)
πΈ SYNOPSIS πΈ
use DBM::Deep::ConfigData;
$value = DBM::Deep::ConfigData->config('foo');
$value = DBM::Deep::ConfigData->feature('bar');
@names = DBM::Deep::ConfigData->config_names;
@names = DBM::Deep::ConfigData->feature_names;
DBM::Deep::ConfigData->set_config(foo => $new_value);
DBM::Deep::ConfigData->set_feature(bar => $new_value);
DBM::Deep::ConfigData->write; # Save changes
No cap, that's the whole vibe up there. π
π DESCRIPTION π
Okay so picture this: DBM::Deep::ConfigData is the module that holds the configuration data for the DBM::Deep module. That's literally its whole job. π«Ά
It also hands you a programmatic interface for getting or setting that configuration data β so you're not out here editing files like a peasant, you're doing it through methods. Iconic.
β οΈ Real talk though: in order to actually make changes, you'll have to have write access to the DBM::Deep::ConfigData module. And you should attempt to understand the repercussions of your actions. Like, yes bestie, go off, but know what you're doing first π this is config, not a group chat.
π METHODS π
config($name)
Give it a string argument and it returns the value of the configuration item with that name. If there's no such item? undef. That's it. That's the whole method. β¨
feature($name)
Same energy: hand it a string argument, get back the value of the feature by that name. No such feature? undef, and it's not even sorry. π
set_config($name, $value)
Sets the configuration item with the given name to the given value. And here's the fun part β the value may be any Perl scalar that will serialize correctly using Data::Dumper. That includes references, objects (usually), and complex data structures. It probably does not include transient things like filehandles or sockets. So like, don't try it with a socket, bestie, that's giving unserializable π«
set_feature($name, $value)
Sets the feature with the given name to the given boolean value. The value will be converted to 0 or 1 automatically β so it does the whole "truthy/falsy" cleanup for you. Slay. π₯
config_names()
Returns a list of all the names of config items currently defined in DBM::Deep::ConfigData. In scalar context? Returns the number of items instead. Versatile queen. π
feature_names()
Returns a list of all the names of features currently defined in DBM::Deep::ConfigData, or in scalar context, the number of features. Same deal as above, just 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 caveat: it does not include such features that have later been set to a fixed value. So if you pinned one down, it's out of this list. π
write()
Commits any changes from set_config() and set_feature() to disk. Requires write access to the DBM::Deep::ConfigData module β yes, again. It's a whole thing. π
π AUTHOR π
DBM::Deep::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 DBM::Deep::ConfigData. So like, credit where it's due, but also not his content. Respect the nuance. π«Ά
And that's the page, bestie β brought to you by perl v5.42.0, dated 2023-11-13, and filed under DBM::D...figData(3pm). Go forth and configure responsibly β¨π
π¦ where this page comes from
- opensuse-leap 16.0: perl-DBM-Deep 2.0019-bp160.1.11 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms