X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FInifile.pm;h=43689d1c032385a034d9b9751063f6b21a78ec21;hb=73a58f3dceeb378343ceb151942828eea686b75a;hp=2331ca7712d1ddbf7613151ef2952bce3c764d2c;hpb=dc3cd296e62eb09a16fa694d9b3a7158e4cf63bf;p=kivitendo-erp.git diff --git a/SL/Inifile.pm b/SL/Inifile.pm index 2331ca771..43689d1c0 100644 --- a/SL/Inifile.pm +++ b/SL/Inifile.pm @@ -37,8 +37,10 @@ package Inifile; use IO::File; +use strict; + sub new { - $main::lxdebug->enter_sub(); + $main::lxdebug->enter_sub(2); my ($type, $file, %options) = @_; @@ -49,7 +51,7 @@ sub new { my $self = { "FILE" => $file }; - open FH, "$file" or Form->error("$file : $!"); + open FH, "$file" or $::form->error("$file : $!"); while () { chomp; @@ -88,7 +90,7 @@ sub new { } close FH; - $main::lxdebug->leave_sub(); + $main::lxdebug->leave_sub(2); return bless $self, $type; } @@ -99,7 +101,7 @@ sub write { my ($self) = @_; my $file = $self->{FILE}; - my $fh = IO::File->new($file, "w") || Form->error("$file : $!"); + my $fh = IO::File->new($file, "w") || $::form->error("$file : $!"); foreach my $section_name (sort keys %{ $self }) { next if $section_name =~ m/^[A-Z]+$/; @@ -116,4 +118,3 @@ sub write { } 1; -