<br><font size=2 face="sans-serif">Hello,</font>
<br>
<br><font size=2 face="sans-serif">That is OK</font>
<br>
<br><font size=2 face="sans-serif">Best regards,<br>
Vidar L. Johannessen<br>
System developer and technical support<br>
<br>
Virtek Communication as<br>
Telephone: +47 33 03 05 35<br>
Telefax: +47 33 03 05 31<br>
E-mail: vidar.loken.johannessen@virtek.no
<br>
Web Site: www.virtek.no<br>
</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>gregor herrmann <gregor+debian@comodo.priv.at></b>
</font>
<p><font size=1 face="sans-serif">05.04.2008 20:34</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">Vidar.Loken.Johannessen@virtek.no, 400921@bugs.debian.org</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">Re: Bug#400921: Config::IniFiles cannot
be used against an empty file</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><tt><font size=2>On Wed, 29 Nov 2006 17:28:33 +0100, Vidar.Loken.Johannessen@virtek.no
wrote:<br>
<br>
> Trying to open an empty file (that exists) and add a section. Get
error <br>
> message "Can't call method "AddSection" on an undefined
value at test.pl <br>
> line 7."<br>
<br>
I'm not sure if this is actually a bug; the documentation says:<br>
<br>
If this option ["-file" on ->new()] is not specified, (i.e.
you are<br>
creating a config file from scratch) you must specify a target file<br>
using SetFileName in order to save the parameters.<br>
<br>
If I change your example to ...<br>
<br>
~~~~~~~~~~~~~<br>
#!/usr/bin/perl<br>
use strict;<br>
use Config::IniFiles;<br>
<br>
my $cfg = Config::IniFiles->new();<br>
$cfg->SetFileName('empty.ini');<br>
$cfg->AddSection("abc");<br>
$cfg->RewriteConfig(); <br>
~~~~~~~~~~~~~<br>
<br>
... there are no more errors.<br>
<br>
<br>
Would it be alright if I close this bug?<br>
<br>
Cheers,<br>
gregor <br>
-- <br>
.''`. http://info.comodo.priv.at/ | gpg key ID: 0x00F3CFE4<br>
: :' : debian: the universal operating system - http://www.debian.org/<br>
`. `' member of https://www.vibe.at/ | how to reply: http://got.to/quote/<br>
`- NP: Cranberries: Dreams<br>
</font></tt>
<br>