From: Frank Brehm Date: Fri, 27 Dec 2013 09:41:27 +0000 (+0100) Subject: Modifications in AUTOLOAD methods X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=b3b832c0215a0b5aa6c61340a26cd6a250357418;p=scripts%2Fsolaris.git Modifications in AUTOLOAD methods --- diff --git a/LogRotate/Conf.pm b/LogRotate/Conf.pm index 3025c44..9b0a455 100644 --- a/LogRotate/Conf.pm +++ b/LogRotate/Conf.pm @@ -160,8 +160,9 @@ sub AUTOLOAD { $attr =~ s/.*:://; $attr = lc($attr); - - croak "Ungueltige Attributmethode ->$attr()" unless $ok_field{$attr}; + + return if $attr eq 'destroy'; + croak __PACKAGE__ . "::AUTOLOAD(): Ungueltige Attributmethode ->$attr()" unless $ok_field{$attr}; return $self->compress_cmd(@_) if $attr eq "compress_cmd"; return $self->default_compress(@_) if $attr eq "default_compress"; @@ -1918,4 +1919,4 @@ Frank Brehm =cut - +# vim: ts=4 et diff --git a/LogRotate/StateFile.pm b/LogRotate/StateFile.pm index e07a398..f025a8c 100644 --- a/LogRotate/StateFile.pm +++ b/LogRotate/StateFile.pm @@ -106,7 +106,8 @@ sub AUTOLOAD { $attr =~ s/.*:://; $attr = lc($attr); - croak "Ungueltige Attributmethode ->$attr()" unless $ok_field{$attr}; + return if $attr eq 'destroy'; + croak __PACKAGE__ . "::AUTOLOAD(): Ungueltige Attributmethode ->$attr()" unless $ok_field{$attr}; return $self->file(@_) if $attr eq "file"; return $self->test(@_) if $attr eq "test"; @@ -414,4 +415,4 @@ Frank Brehm =cut - +# vim: ts=4 et