Girocco/Dumper.pm: new module to assist with installation config
commitbc9113ede106f74c8618cef4fc58772d7e5db1b7
authorKyle J. McKay <mackyle@gmail.com>
Thu, 29 Oct 2020 12:32:22 +0000 (29 05:32 -0700)
committerKyle J. McKay <mackyle@gmail.com>
Thu, 29 Oct 2020 12:32:22 +0000 (29 05:32 -0700)
tree5258fa5fa4182145e3fe9ba1838a1ab171330683
parente4c672065b2c4a002ec51e79f5b561c1b81fa782
Girocco/Dumper.pm: new module to assist with installation config

The Girocco/Config.pm module supplies Girocco's configuration for
the installation.

It is "use"d by virtually every perl module that's part of Girocco.

It's sole purpose is to set configuration variables.  However, it
also contains various validation code and so forth that runs during
installation to validate various settings and so on.

There's no reason to run the validation code after the settings
have been validated at installation time and then installed.

Provide utility functions in Girocco::Dumper that can "freeze" a
configuration into a new module file that does nothing except set
configuration values -- both *Girocco::Config::<var> AND $ENV{<name>}
AND the umask.

The installation process already does something similar for use
by shell scripts when it creates the 'shlib_vars.sh' file during
installation.

Provide a utility function for 'shlib_vars.sh' creation as well to
avoid including non-scalar variables and scalars that contain a
reference in the generated 'shlib_vars.sh' because they just end
up as useless garbage when they are stringified.

Signed-off-by: Kyle J. McKay <mackyle@gmail.com>
Girocco/Dumper.pm [new file with mode: 0644]