Unterstützung für andere Datenbankencodings als Unicode/UTF-8 entfernt
[kivitendo-erp.git] / SL / Inifile.pm
index 2331ca7..43689d1 100644 (file)
@@ -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 (<FH>) {
     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;
-