in reply to To Extend, to Use, to Create

You don't need to use blocks with Config::Tiny, it hides "global" variables under the _ key:
;;config var1=foo var2=bar

readconfig.pl:

use Config::Tiny; my $conf = Config::Tiny->read('test.ini'); require Data::Dumper; print Data::Dumper::Dumper($conf);

dump:

$VAR1 = bless( { '_' => { 'var1' => 'foo', 'var2' => 'bar' } }, 'Config::Tiny' );

Replies are listed 'Best First'.
Re^2: To Extend, to Use, to Create
by Bod (Parson) on Dec 07, 2020 at 20:59 UTC

    I did look at Config::Tiny but I cannot see now why I rejected it...

    I have written a module which does what I need to do and I'm currently trying to get my head around POD and test files - neither of which I have used before.