Skip Menu |

This queue is for tickets about the Config-Tiny CPAN distribution.

Report information
The Basics
Id: 85386
Status: resolved
Priority: 0/
Queue: Config-Tiny

People
Owner: Nobody in particular
Requestors: DOHERTY [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 2.14
Fixed in: (no value)



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' );
Added an FAQ item to discuss this issue, with workarounds.