Public...igData(3pm)

πŸ’– Public...igData(3pm) β€” aka Publican::ConfigData πŸ’–

okay bestie, welcome to the manual page for Publican::ConfigData, and yeah the title got chopped up all cute in the header but it's giving Public...igData(3pm), from the User Contributed Perl Documentation corner of the world. she's a Perl module. she holds config. let's get into it 🫢


✨ NAME ✨

Publican::ConfigData β€” Configuration for Publican πŸŽ€


🌸 SYNOPSIS 🌸

like, here's the whole vibe in one go:

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

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

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

look at that. immaculate. # Save changes β€” the girlies love persistence πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

so this module holds the configuration data for the Publican module. that's her whole job. that's her main character energy.

she also hands you a programmatic interface for getting or setting that configuration data β€” so you can poke at it from code instead of, like, editing files by hand.

⚠️ real talk though: to actually make changes, you have to have write access to the Publican::ConfigData module itself. and before you go changing stuff, you should genuinely attempt to understand the repercussions of your actions. no cap. understand first, edit second. 🫣

πŸ’… METHODS πŸ’…

config($name)

give her a string argument, she gives you back the value of the configuration item with that name. 🎁

and if no such item exists? you get undef. the void. the nothingness. the silence. πŸ’€

feature($name)

give her a string argument, she gives you back the value of the feature with that name. ✨

and again β€” no such feature? undef. she's not mad, she's just honest. 😭

set_config($name, $value)

sets the configuration item with the given name to the given value. πŸ”§

the value can be any Perl scalar that will serialize correctly using Data::Dumper. that includes references, objects (usually), and complex data structures β€” she's flexible like that, an icon.

but it probably does not include transient things like filehandles or sockets. so don't come at her with your socket. she will not hold it. πŸ™ˆ

set_feature($name, $value)

sets the feature with the given name to the given boolean value. πŸ”

the value gets converted to 0 or 1 automatically. so it's a yes/no situation and she's making it official.

config_names()

returns a list of all the names of config items currently defined in Publican::ConfigData. πŸ—’οΈ

in scalar context? you get the number of items instead. one method, two moods.

feature_names()

returns a list of all the names of features currently defined in Publican::ConfigData. 🌈

in scalar context, it's the number of features. same deal.

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: this does not include such features that have later been set to a fixed value. once it's locked in, it's locked in. periodt.

write()

commits any changes from set_config() and set_feature() to disk. πŸ’Ύ

requires write access to the Publican::ConfigData module. so like, she needs the keys to the house before she can redecorate. πŸ”‘


πŸ‘‘ AUTHOR πŸ‘‘

Publican::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 Publican::ConfigData. so like... the tool made it, the man built the tool, but the contents? not his, respectfully. πŸŽ€


okay that's the whole page bestie, you ate it up, go configure something responsibly 🌸

πŸ’– this was perl v5.26.2, dated 2018-07-08, brought to you by the User Contributed Perl Documentation crew πŸ’–

πŸ“¦ where this page comes from