[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: postgrey problem (war perl updaten)



Roland Schmid wrote:

> Beim Starten von postgrey erhalte ich diese Fehlermeldung:
> postgreyUse of uninitialized value in split at /usr/lib/perl5/Sys/Syslog.pm
> line 123
> In Zeile 123 der Syslog.pm steht dies:
> 
> sub openlog {
>     ($ident, my $logopt, $facility) = @_;
> 
>     for my $opt (split /\b/, $logopt) {  << Zeile 123


Das wird hier etwas ausführlicher diskutiert:

http://rt.cpan.org/Public/Bug/Display.html?id=21866


Ein Patch wird in dem Thread auch gebracht:

== cut ==
--- Syslog.pm   2006-08-28 23:26:09.000000000 +0200
+++ Syslog.pm   2006-10-03 12:20:43.033802752 +0200
@@ -119,6 +119,7 @@

 sub openlog {
     ($ident, my $logopt, $facility) = @_;
+    $logopt ||= '';

     for my $opt (split /\b/, $logopt) {
         $options{$opt} = 1 if exists $options{$opt}
== cut ==

Damit ist der Value auf in $logopt jeden Fall initialisiert und niemals
undef. Witzig! :-)

Wobei: lt. "perldoc Sys::Syslog" dürfte dort niemals "undef" sein.
Wenigstens ein Leerstring sollte da IMHO als zweiter Parameter von
openlog() vorkommen.

Wie ruft perlgrey eigentlich openlog() auf?



t++



Reply to: