diff -r 08527fba71ae -r 8cef3bca3096 log.pl --- a/log.pl Thu Sep 15 09:12:46 2011 +0200 +++ b/log.pl Thu Sep 15 09:16:12 2011 +0200 @@ -72,7 +72,6 @@ ? $config::logfile : "/root/LOG.$NODENAME"; - my $Dbh; sub identity(); @@ -90,8 +89,14 @@ "type=s" => \$opt_apt, "init-dir=s" => \$opt_initdir, "f|file=s" => \$opt_file, - "man" => sub { pod2usage(-verbose => 2, -exit => 0) }, "help" => sub { pod2usage(-verbose => 0, -exit => 0) }, + "man" => sub { + pod2usage( + -verbose => 2, + -exit => 0, + -noperldoc => system("perldoc -V 2>/dev/null 1>/dev/null") + ); + }, ) or pod2usage(); if ($opt_message =~ /^@(.*)/) { @@ -153,7 +158,7 @@ if ($opt_db) { END { $Dbh->disconnect() if $Dbh; } $Dbh = DBI->connect($DSN, $USER, $PW, { RaiseError => 0 }) - or warn $DBI::errstr; + or warn $DBI::errstr; } # Temporärfile öffnen @@ -244,9 +249,10 @@ my $subject = (split /\n/, $text)[0]; $subject =~ s/^\s*\S\s//; # cut the "itemizer" - # and now convert to quoted printable (UTF-8) - # =?utf-8?q?St=C3=BCmper_am_Werk=3A_Shellscripte_aus_der?= - $subject = word_encoded("Service [" . full_hostname() . "]: $subject"); + # and now convert to quoted printable (UTF-8) + # =?utf-8?q?St=C3=BCmper_am_Werk=3A_Shellscripte_aus_der?= + $subject = + word_encoded("Service [" . full_hostname() . "]: $subject"); $mailer->open( { @@ -300,6 +306,7 @@ sub word_encoded($) { my $line = shift; + # to get "Q" word encoding, we've to fix the result a bit # http://en.wikipedia.org/wiki/MIME # FIXME: The line may be longer than expected!