sub File::Unpack::log { my ($self, $text) = @_; if (my $fp = $self->{lfp}) { die "log($self->{logfile}): print failed: $text\n" if(!$fp->print($text)); $self->{lfp_printed}++; } }