Re: Config::General save_file() not converting named block to nested block when there is only one block

2020-03-23 Thread Frans Spiesschaert
Hi Andi, I had a closer look at General.pm. It turns out that when a configuration file has only one block, Perl module Config::General puts it out as a named block on purpose. See lines 1445 - 1457 of General.pm on this. This behaviour has been introduced on Wed 18 Jul 2012 in version 2.51 of

Re: Config::General save_file() not converting named block to nested block when there is only one block]

2020-02-26 Thread Frans Spiesschaert
: > > Hi, > > > > > > > > This is my exmple.pl > > > > > > > > #!/usr/bin/perl -w > > > > > > > > use strict; > > > > use Config::General; > > > > > > > > my $datafilename

Re: Config::General save_file() not converting named block to nested block when there is only one block

2020-02-26 Thread Andy Bach
: id 13 On Wed, Feb 26, 2020 at 2:28 PM Frans Spiesschaert < frans.spiesscha...@yucom.be> wrote: > Hi, > > This is my exmple.pl > > #!/usr/bin/perl -w > > use strict; > use Config::General; > > my $datafilename = 'example.conf';

Config::General save_file() not converting named block to nested block when there is only one block

2020-02-26 Thread Frans Spiesschaert
Hi, This is my exmple.pl #!/usr/bin/perl -w use strict; use Config::General; my $datafilename = 'example.conf'; my %confighash; my $config = \%confighash; $config->{client}->{Bob}->{city} = 'Brussels'; $config->{client}->{Jane}->{city} = 'Ant

Re: Config::General

2008-07-07 Thread Dermot
Hi Rob, 2008/7/7 Rob Dixon <[EMAIL PROTECTED]>: > Hi Dermot. > > Does this help? > > Rob > > > use strict; > use warnings; > > use Config::General; > > my $config = Config::General->new( -ConfigFile => \*DATA); > my %config = $config->g

Re: Config::General

2008-07-07 Thread Rob Dixon
Dermot wrote: > HI All, > > Is anyone familiar with the workings of Config::General? > > I am struggling to get my configuration values out of a file. > > My config file looks like this: > > name myApp > > > dbi:SQLite __HOME__/database.db >

Re: Config::General

2008-07-07 Thread Dermot
2008/7/7 Stewart Anderson <[EMAIL PROTECTED]>: > > I used Config::Simple recently. Unless you really need/want the > extra functionality/complexity I'd recommend giving that a look. > Thanx Stu. I had a quick dabble. Unfortunately Config::Simple does seem to be able to handle structured data

Config::General

2008-07-07 Thread Dermot
HI All, Is anyone familiar with the workings of Config::General? I am struggling to get my configuration values out of a file. My config file looks like this: name myApp dbi:SQLite __HOME__/database.db When I use Data::Dumper to dump the whole config I see this

Re: Config::General help

2002-06-10 Thread drieux
On Monday, June 10, 2002, at 07:56 , drieux wrote: > foreach (@conf_keys) { > print "Player $_ has:\n"; > while(my ($key, $val) = each $config{$_}) { > print "\t$key => $val\n"; > } > } teach me to write off the top of

Re: Config::General help

2002-06-10 Thread drieux
On Monday, June 10, 2002, at 07:11 , Postman Pat wrote: [..] > > Just about all that I have been able to do from the docs is this: > \my %config = ParseConfig(-file => "foo.conf", -LowerCaseNames => 1); > > Please help... I've just peeked at the code here but you might try to do say my

Config::General help

2002-06-10 Thread Postman Pat
Greetings, I am trying to use config::general on my script. The config file looks like this: lname=soap uname=joes [EMAIL PROTECTED] gay=1 lname=doe uname=jandoe [EMAIL PROTECTED] gay=0 lname=shady uname=eminem [EMAIL PROTECTED] gay=1 I would like to read this in from file and display