Subject: | Weird interface design |
Here, you can see that calling the read_string method doesn't result in the Config::Tiny object gaining any configuration data. You have to assign the result of the method call to the object... which makes no sense. Is the module object oriented or not?
perl -MData::Dumper -MConfig::Tiny -E 'my $c = Config::Tiny->new(); $c->read_string("one=s"); say Dumper $c'
$VAR1 = bless( {}, 'Config::Tiny' );
mike@doherty:~$ perl -MData::Dumper -MConfig::Tiny -E 'my $c = Config::Tiny->new(); $c = $c->read_string("one=s"); say Dumper $c'
$VAR1 = bless( {
'_' => {
'one' => 's'
}
}, 'Config::Tiny' );