Skip Menu |

This queue is for tickets about the Test-MTA-Exim4 CPAN distribution.

Report information
The Basics
Id: 110012
Status: new
Priority: 0/
Queue: Test-MTA-Exim4

People
Owner: nigel.metheringham [...] gmail.com
Requestors: hs [...] schlittermann.de
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: 'undefined value' in sprintf.
Hello Nigel, I was just playing with your Test::MTA::Exim4 and got some ugly 'undefined value' in sprintf. 399 my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) = run( 400 command => [ $self->{exim_path}, @args ], 401 verbose => $self->{debug}, 402 403 ## TODO timeout appears to have a nasty interaction which 404 ## causes the tests to fail, plus hang after the run 405 #timeout => $self->{timeout} 406 ); 407 408 # as documented in IPC::Cmd, the buffer returns are an arrayref 409 # unexpectedly, that array has a single element with a slurped string 410 # so we reprocess into a one line per element form 411 $full_buf = [ map { ( split( /\r?\n/, $_ ) ) } @{ $full_buf || [] } ]; 412 $stdout_buf = [ map { ( split( /\r?\n/, $_ ) ) } @{ $stdout_buf || [] } ]; 413 $stderr_buf = [ map { ( split( /\r?\n/, $_ ) ) } @{ $stderr_buf || [] } ]; 414 415 $self->{_state}{last_error} = $error_code // ''; 416 $self->{_state}{last_output} = $full_buf; $Test::MTA::Exim4::VERSION is 0.05 $IPC::Cmd::VERSION is 0.7 Perl is 5.14 Line 415 I changed to avoid this. To be compatible with older Perl versions it should be written more prosaic. the IPC::Cmd::run (line 399) seems to leave the $error_code undefined if there was no error. I had an address test where no error occured, but the wrong result (routing other than expected). BTW, I think the output in case of any unexpected result could be improved. But for now just testing is better than no testing at all. Best regards from Dresden/Germany