in reply to Re^2: Parameters not in order by using Config:Tiny
in thread Parameters not in order by using Config::Tiny

OK, so you have options for your options based on things, like maybe the date. I must be dense today, but I can't see how sorting would help unless you have cleverly named your sections (as in your example) and then do:

my $template; while ( I am looping through Sections) { next unless first half of name is 'until'; next unless date in second half of name hasn't passed yet; $template = this_Section->{TEMPLATE}; last; }

But for the OP, how would

foreach $ini_sect ( sort keys %ini_file ) { %$ini_sect = %{ $ini_file{$ini_sect} }; }

be any better than

foreach $ini_sect ( keys %ini_file ) { %$ini_sect = %{ $ini_file{$ini_sect} }; }

??

Remember: Ne dederis in spiritu molere illegitimi!

Replies are listed 'Best First'.
Re^4: Parameters not in order by using Config:Tiny
by Corion (Patriarch) on Jul 06, 2015 at 15:11 UTC

    Yeah, I assume that the OP has some "clever" sorting of their sections, and the last one in the file should win.

    My use case is to allow for "evolution" of the input and output while still being able to process and output files with the older formats, according to the report date.