mikejones has asked for the wisdom of the Perl Monks concerning the following question:
I am wondering what to do if for example Compress::Zlib is not installed while using LogFile::Rotate. I searched through the archives and came up empty.
For example in this code I originally tried to use both Gzip options, but Perl would YAK at me when it failed on one.
< snip > sub logroll { my $logs = new Logfile::Rotate( File => $log, Count => 15, Gzip => 'lib', Gzip => '/usr/bin/gzip', Dir => $logdir, Flock => 'yes', Persist => 'yes' ) ; $logs->rotate() ; }
Can I use an or statement? Please help with this code so that if lib fails it will try gzip and not YAK at me...don't like to be YAKed at! : )
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: what to do if module is not installed, YIKES!
by runrig (Abbot) on May 06, 2008 at 19:46 UTC | |
|
Re: what to do if module is not installed, YIKES!
by moritz (Cardinal) on May 06, 2008 at 19:05 UTC | |
by mikejones (Scribe) on May 06, 2008 at 19:35 UTC |