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