sub logf { my $error = shift; my $line = shift; if (!$line) { $line = [caller(0)]->[2]; } $logger->fatal("(Line: $line) " . $error); die "\n"; }