Skip Menu |
 

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

Report information
The Basics
Id: 50772
Status: resolved
Priority: 0/
Queue: Config-IniFiles

People
Owner: Nobody in particular
Requestors: jakob.voss [...] gbv.de
Cc:
AdminCc:

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



Subject: Get a full section as hash
Download (untitled) / with headers
text/plain 330b
Hi, I found no easy, documented way to get a full section as hash, so I wrote this method: sub GetSection { my ($ini, $section) = @_; return unless defined $section and $ini; return map { $_ => $ini->val($section,$_) } ($ini->Parameters( $section )); } Could you please add this or a similar method? Cheers, Jakob
Download (untitled) / with headers
text/plain 1.4k
Hi! Thanks for your suggestion. See below for my response. On Fri Oct 23 10:18:56 2009, VOJ wrote: Show quoted text
> Hi, > > I found no easy, documented way to get a full section as hash, so I > wrote this method: > > sub GetSection { > my ($ini, $section) = @_; > return unless defined $section and $ini; > return map { $_ => $ini->val($section,$_) } ($ini->Parameters( > $section )); > } > > Could you please add this or a similar method? >
Please write a patch against the svn: http://config-inifiles.svn.sourceforge.net/svnroot/config-inifiles/ The patch should have a patch to the code, to the POD documentation and an extensive new test script under t/ testing this functionality. Please use Test::More and Test::Count to write the script properly. Also, make sure you return a single hash-ref and not a flattened hash, which will make returning an error code harder. I should note that I'm not planning to enhance Config-IniFiles a lot except for bug-fixes and cleanups of code (especially the testing code). I'm unhappy with its convulted perltie functionality, and there are many other ini-handling modules on CPAN. (Someone on Perl-Israel gave an entire presentation once about the Config:: namespace on CPAN.) Config-IniFiles is not too bad and relatively self-contained and high-quality, and seems popular (and was also given as an example for an INI module in the book "Mastering Perl"), but it's still not something I'm having a lot of fun maintaining. Regards, -- Shlomi Fish Show quoted text
> Cheers, > Jakob
No response from the requestor, so closing as OLD.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.