[Logwatch-Devel] CVS update logwatch.pl please test

Mike Tremaine mgt at stellarcore.net
Tue Jan 10 11:19:10 MST 2006


On Fri, 2006-01-06 at 17:24 -0800, Mike Tremaine wrote:
> On Sat, 2006-01-07 at 01:27 +0100, Markus Lude wrote:
> > On Wed, Jan 04, 2006 at 10:01:46AM -0800, Mike Tremaine wrote:
> > > 
> > > I just committed the HTML and MIME::Base64 patches to logwatch.pl this
> > > was pretty large re-write and it needs both testing and a few cleanups
> > > but I wanted to get the majority of it out now. So for those braves
> > > souls out there please give it a test.
> > > 
> > > 
> > > Changes...
> > > 
> > > 2) We now use MIME::Base64 and encode the output strings as needed IF
> > > the option "--encode" is set. This works on both text and html
> > 
> > We don't have this perl module on our default solaris 9 installations.
> > Would it be possible to let logwatch test for the presence of this
> > module and if not available show a warning and/or ignore --encode if it
> > is used?
> > 
> > Thanks for your work.
> > 
> > Regards,
> > Markus
> > 
> 
> Markus,
> 
>  You think I would have checked Solaris 9 since there is a sparc 20
> sitting at my foot. :/ I guess MIME::Base64 came standard after perl
> 5.6. I'll figure out a way to make it work [without --encode] for those
> without MIME::Base64. 
> 
> Thanks for reporting it.


Here is what I'm going to commit for this problem. Instead of just doing
a general "use MIME::Base64" I'm going to wrap it all in some logic like
so.


if ( $Config{'encode'} == 1 ) {
   eval "require MIME::Base64";
   if ($@) {
      print STDERR "No MIME::Base64 installed can not use --encode\n";
    } else {
      import MIME::Base64;
   }
}


That so long as you do not try to use --encode logwatch will work
without the MIME::Base64 installed. That should protected the perl 5.6.1
users out there.

I'll commit this to CVS now.

-Mike





More information about the Logwatch-Devel mailing list