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