$mode = 'r' if !$mode;
$self->{mode} = $mode;
- my $fh = new FileHandle $self->{fn}, $mode;
+ my $fh = new FileHandle $self->{fn}, $mode, 0666;
return undef if !$fh;
$fh->autoflush(1) if $mode ne 'r'; # make it autoflushing if writable
$self->{fh} = $fh;
sub DESTROY # catch undefs and do what is required further down the tree
{
my $self = shift;
- DXDebug::dbg("dxlog", "closing $self->{fn}\n");
+# DXDebug::dbg("dxlog", "closing $self->{fn}\n");
undef $self->{fh} if defined $self->{fh};
}
1;