CONFIG_DATA(1)
okay so bestie, this is CONFIG_DATA(1) from the User Contributed Perl Documentation β yes, the whole manual page, and we're gonna get you comfy with config_data π
π NAME π
config_data β Query or change configuration of Perl modules. slay. β¨
πΈ SYNOPSIS πΈ
# Get config/feature values
config_data --module Foo::Bar --feature bazzable
config_data --module Foo::Bar --config magic_number
# Set config/feature values
config_data --module Foo::Bar --set_feature bazzable=1
config_data --module Foo::Bar --set_config magic_number=42
# Print a usage message
config_data --help
π¦ DESCRIPTION π¦
okay so config_data gives you a command-line interface to the configuration of Perl modules. When we say βconfiguration,β we mean something like βuser preferencesβ or βlocal settings.β This tool is a formalization and abstraction of the systems that people like Andreas Koenig (CPAN::Config), Jon Swartz (HTML::Mason::Config), Andy Wardley (Template::Config), and Larry Wall (perl's own Config.pm) developed independently. iconic lineage, honestly. π
The configuration system employed here was developed in the context of Module::Build. Under this system, configuration information for a module Foo, for example, is stored in a module called Foo::ConfigData (and yes, I would have called it Foo::Config, but that name was taken by all those other systems mentioned in the previous paragraph...). These ...::ConfigData modules contain the configuration data, as well as publicly accessible methods for querying and setting β yes, actually re-writing β the configuration data. The config_data script, whose docs you are currently reading, is merely a front-end for those methods. If you wish, you may create alternate front-ends. no cap. π
The two types of data that may be stored are called βconfigβ values and βfeatureβ values. A βconfigβ value may be any perl scalar, including references to complex data structures. It must, however, be serializable using Data::Dumper. A βfeatureβ is a boolean (1 or 0) value. that's the whole mood. π¦
β¨ USAGE β¨
This script functions as a basic getter/setter wrapper around the configuration of a single module. On the command line, specify which module's configuration you're interested in, and pass options to get or set βconfigβ or βfeatureβ values. The following options are supported:
module,--moduleβ Specifies the name of the module to configure. It is required. β¨feature,--featureβ When passed the name of a βfeature,β shows its value. The value will be1if the feature is enabled,0if the feature is not enabled, or empty if the feature is unknown. When no feature name is supplied, the names and values of all known features will be shown. πconfig,--configβ When passed the name of a βconfigβ entry, shows its value. The value will be displayed usingData::Dumper(or similar) as perl code. When no config name is supplied, the names and values of all known config entries will be shown. πset_feature,--set_featureβ Sets the given βfeatureβ to the given boolean value. Specify the value as either1or0. π₯set_config,--set_configβ Sets the given βconfigβ entry to the given value. πeval,--evalβ If the--evaloption is used, the values inset_configwill be evaluated as perl code before being stored. This allows moderately complicated data structures to be stored. For really complicated structures, you probably shouldn't use this command-line interface, just use the Perl API instead. π it's giving βknow your limits,β fr fr.help,--helpβ Prints a help message, including a few examples, and exits. π«Ά
π AUTHOR π
Ken Williams, kwilliams@cpan.org. author icon behavior. π
π COPYRIGHT π
Copyright (c) 1999, Ken Williams. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π SEE ALSO π
Module::Build(3), perl(1). go read those too, bestie. π¦
mwah π that's the whole page β it's perl v5.42.0, dated 2023-04-29, and the manual is CONFIG_DATA(1). periodt. π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: perl-Module-Build 0.423400-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms