Hi,
I have bugzilla 2.22.2 installed and as part of that there is "whine.pl" file that is called from Cron.
Following leastest updates I have been getting following error (warning) from perl.
[Tue Aug 26 07:00:02 2008] whine.pl: Statement unlikely to be reached at /usr/lib/perl5/vendor_perl/5.8.5/Mail/Mailer/qmail.pm line 11.
[Tue Aug 26 07:00:02 2008] whine.pl: (Maybe you meant system() when you said exec()?)
this is correct as the file qmail.pm reads as follows:
package Mail::Mailer::qmail;
use vars qw(@ISA);
require Mail::Mailer::rfc822;
@ISA = qw(Mail::Mailer::rfc822);
sub exec {
my($self, $exe, $args, $to, $sender) = @_;
my $address = defined $sender && $sender =~ m/\<(.*?)\>/ ? $1 : $sender;
exec($exe, (defined $address ? "-f$address" : ()));
die "ERROR: cannot run $exe: $!";
}
As exec will not return unless there is a error (unlike system) then the 'die' message will not get generated.
From what I've read, perl warns you of this if you are using '-w'.
Question is (as I'm now getting lots of emails from Cron!) how is this fixed?
1- Is this a bug - in that qmail.pm should process a 'system()' and handle failed returns? Then I'll enter as a bug.
2- should the -w flag be turned off? (if so how? where?)
Thanks
Paul