Bug#400921: Config::IniFiles cannot be used against an empty file
Vidar.Loken.Johannessen at virtek.no
Vidar.Loken.Johannessen at virtek.no
Mon Apr 7 06:17:20 UTC 2008
Hello,
That is OK
Best regards,
Vidar L. Johannessen
System developer and technical support
Virtek Communication as
Telephone: +47 33 03 05 35
Telefax: +47 33 03 05 31
E-mail: vidar.loken.johannessen at virtek.no
Web Site: www.virtek.no
gregor herrmann <gregor+debian at comodo.priv.at>
05.04.2008 20:34
To
Vidar.Loken.Johannessen at virtek.no, 400921 at bugs.debian.org
cc
Subject
Re: Bug#400921: Config::IniFiles cannot be used against an empty file
On Wed, 29 Nov 2006 17:28:33 +0100, Vidar.Loken.Johannessen at virtek.no
wrote:
> Trying to open an empty file (that exists) and add a section. Get error
> message "Can't call method "AddSection" on an undefined value at test.pl
> line 7."
I'm not sure if this is actually a bug; the documentation says:
If this option ["-file" on ->new()] is not specified, (i.e. you are
creating a config file from scratch) you must specify a target file
using SetFileName in order to save the parameters.
If I change your example to ...
~~~~~~~~~~~~~
#!/usr/bin/perl
use strict;
use Config::IniFiles;
my $cfg = Config::IniFiles->new();
$cfg->SetFileName('empty.ini');
$cfg->AddSection("abc");
$cfg->RewriteConfig();
~~~~~~~~~~~~~
... there are no more errors.
Would it be alright if I close this bug?
Cheers,
gregor
--
.''`. http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4
: :' : debian: the universal operating system - http://www.debian.org/
`. `' member of https://www.vibe.at/ | how to reply:
http://got.to/quote/
`- NP: Cranberries: Dreams
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20080407/44cf7885/attachment.htm
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/octet-stream
Size: 196 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/pkg-perl-maintainers/attachments/20080407/44cf7885/attachment.obj
More information about the pkg-perl-maintainers
mailing list