Thanks for replying Damian.
Sorry for the delay... I've started this reply a few times, and then thought, just another look at the code.
I've spent a lot of time getting to grips with Config/Std.pm and now think I understand it well enough that I could implement something myself - I've had to suss OO-perl along the way too! (I'm not an OO programmer, but I am au fait with OO principles.)
So - all in all - it's been a good episode. But, surprise surprise, I've now gone and re-jigged the way I'm constructing my conf file for completely different reasons and no longer want an 'in sequence' method.
I still reckon an 'in sequence' method would be a good addition though, so I think you should leave it on your to-do list...!
Would you have any recommendations on Perl books? I already have yours, and I have the Perl in a Nutshell O'Reilly book, but I hate the latter as it makes too many assumptions - I don't come from a unix background, though I've become a lot more confident in unix shellscripting of late, with more exposure at my work. This has probably helped me get into the perl mindset better too.
Basically, I'm looking for a Perl reference book that explains things in English, like yours, instead of in geek-speak that makes me cry. Btw, my very first exposure to Perl I had recommended Mr Wall's O'Reilly Camel book - please don't recommend anything by Larry Wall...
Any suggestions much appreciated.
Cheers,
Clark.
---- "damian@conway.org via RT" <bug-Config-Std@rt.cpan.org> wrote:
=============
<URL:
https://rt.cpan.org/Ticket/Display.html?id=50555 >
Hi Clark,
Show quoted text> In looping round all the entries in a section (once the conf file has
> been read in), I would like the original sequencing in the conf file
> to be preserved. Is this possible? Maybe it already is, and I just
> don't know enough.
The module certainly doesn't do that at present. It would be possible to
have it do so, but at the cost of making every access to the internal
hash vastly slower. Perhaps there could be a drop-in replacement
module (Config::Std::Ordered) that provided this functionality, at the
cost of being 10 times slower. Or perhaps it would be enough to
provide a helper function, so you could write:
use Config::Std qw< ordered_keys >;
for my $key ( ordered_keys(%config) )
I'll put it on the ToDo list, but don't hold your breath...I'm currently so
overcommitted that I have no time to work on any of my CPAN modules
in the foreseeable future. :-(
All the best,
Damian