SDL::ConfigData(3pm)

okay so this is SDL::ConfigData(3pm), the User Contributed Perl Documentation page for it β€” manual name folded in near the top, header line safely not copied, we move πŸ’…βœ¨

πŸ’– NAME πŸ’–

SDL::ConfigData β€” configuration for SDL. That's the whole vibe: it's the configuration-data holder for the "SDL" module. πŸŽ€

✨ SYNOPSIS ✨

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

@names = SDL::ConfigData->config_names;
@names = SDL::ConfigData->feature_names;

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

🌸 DESCRIPTION 🌸

This module holds the configuration data for the "SDL" module. It also provides a programmatic interface for getting or setting that configuration data. So yes bestie, it's giving β€œconfig closet with a little API door.” πŸšͺ✨

⚠️ real talk: in order to actually make changes, you'll have to have write access to the "SDL::ConfigData" module, and you should attempt to understand the repercussions of your actions. no cap, read that part twice πŸ‘€πŸ’€

πŸ› οΈ METHODS πŸ› οΈ

config($name)

Given a string argument, returns the value of the configuration item by that name, or undef if no such item exists. Simple, clean, iconic. πŸ’–

feature($name)

Given a string argument, returns the value of the feature by that name, or undef if no such feature exists. Same energy, feature edition. πŸ¦‹

set_config($name, $value)

Sets the configuration item with the given name to the given value. The value may be any Perl scalar that will serialize correctly using "Data::Dumper". This includes references, objects (usually), and complex data structures. It probably does not include transient things like filehandles or sockets. So like… yes to fancy data, prob no to weird live handles πŸ™ˆ

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. Boolean-ify that thing, periodt. ✨

config_names()

Returns a list of all the names of config items currently defined in "SDL::ConfigData", or in scalar context the number of items. List mode, count mode, she contains multitudes πŸ’…

feature_names()

Returns a list of all the names of features currently defined in "SDL::ConfigData", or in scalar context the number of features. Same deal, feature roster edition. 🌈

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. Does not include such features that have later been set to a fixed value. Dynamic girlies only β€” once fixed, they're not in this list πŸ‘‘πŸ”₯

write()

Commits any changes from set_config() and set_feature() to disk. Requires write access to the "SDL::ConfigData" module. This is the β€œsave changes” button, bestie β€” handle with care 🫢

πŸ‘‘ AUTHOR πŸ‘‘

"SDL::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 "SDL::ConfigData". Respect the lore ✨


that's the whole page, signing off with perl v5.42.0, dated 2024-05-01, and tagged SDL::ConfigData(3pm) β€” bye bestie, go configure responsibly πŸ«ΆπŸ’‹πŸŽ€

πŸ“¦ where this page comes from