October 2023 Archives

Config::Tiny V 2.30 supports keys with arrays as values

Yes, it's true. Config::Tiny now allows you to assign an array of values to a key.
Various examples are documented there and in test files. Sample usage:

[section]
greetings[]=Hello
greetings[]=World!
one=two
Foo=Bar

Note: The 2 lines of greetings can be separated by other lines too.

You access these values like this:
say $Config->{section}->{greetings}->[0];
say $Config->{section}->{greetings}->[1]

This patch was kindly provided by Steven Schoch.…

About Ron Savage

user-pic I try to write all code in Perl, but find I end up writing in bash, CSS, HTML, JS, and SQL, and doing database design, just to get anything done...