1Object::ID::ConfigData(U3s)er Contributed Perl DocumentatOibojnect::ID::ConfigData(3)
2
3
4
6 Object::ID::ConfigData - Configuration for Object::ID
7
9 use Object::ID::ConfigData;
10 $value = Object::ID::ConfigData->config('foo');
11 $value = Object::ID::ConfigData->feature('bar');
12
13 @names = Object::ID::ConfigData->config_names;
14 @names = Object::ID::ConfigData->feature_names;
15
16 Object::ID::ConfigData->set_config(foo => $new_value);
17 Object::ID::ConfigData->set_feature(bar => $new_value);
18 Object::ID::ConfigData->write; # Save changes
19
21 This module holds the configuration data for the "Object::ID" module.
22 It also provides a programmatic interface for getting or setting that
23 configuration data. Note that in order to actually make changes,
24 you'll have to have write access to the "Object::ID::ConfigData"
25 module, and you should attempt to understand the repercussions of your
26 actions.
27
29 config($name)
30 Given a string argument, returns the value of the configuration
31 item by that name, or "undef" if no such item exists.
32
33 feature($name)
34 Given a string argument, returns the value of the feature by that
35 name, or "undef" if no such feature exists.
36
37 set_config($name, $value)
38 Sets the configuration item with the given name to the given value.
39 The value may be any Perl scalar that will serialize correctly
40 using "Data::Dumper". This includes references, objects (usually),
41 and complex data structures. It probably does not include
42 transient things like filehandles or sockets.
43
44 set_feature($name, $value)
45 Sets the feature with the given name to the given boolean value.
46 The value will be converted to 0 or 1 automatically.
47
48 config_names()
49 Returns a list of all the names of config items currently defined
50 in "Object::ID::ConfigData", or in scalar context the number of
51 items.
52
53 feature_names()
54 Returns a list of all the names of features currently defined in
55 "Object::ID::ConfigData", or in scalar context the number of
56 features.
57
58 auto_feature_names()
59 Returns a list of all the names of features whose availability is
60 dynamically determined, or in scalar context the number of such
61 features. Does not include such features that have later been set
62 to a fixed value.
63
64 write()
65 Commits any changes from "set_config()" and "set_feature()" to
66 disk. Requires write access to the "Object::ID::ConfigData"
67 module.
68
70 "Object::ID::ConfigData" was automatically created using
71 "Module::Build". "Module::Build" was written by Ken Williams, but he
72 holds no authorship claim or copyright claim to the contents of
73 "Object::ID::ConfigData".
74
75
76
77perl v5.32.1 2021-01-27 Object::ID::ConfigData(3)