Perl-Sensitive Sunglasses | |
PerlMonks |
Test::Harness bug ? ... or author idiocy ?by syphilis (Archbishop) |
on Nov 05, 2021 at 11:09 UTC ( [id://11138456]=perlquestion: print w/replies, xml ) | Need Help?? |
syphilis has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
There's an issue I've struck a few times with perl extensions that I've authored, where I've put a debug printf() statement inside an XSub in the XS file. It's always a totally banal printf() statement - eg printf("In the 'if' block\n"); or printf("In the else block\n"):. It's pretty simple stuff, serves its purpose well, and is generally useful. However, if: 1) I then run make test on this perl extension; && 2) in the running of a particular test script, this printf() statement gets called tens of thousands of times then make test will report that the test script has failed, though all tests have passed. I guess it's something to do with the way that the Test::Harness suppresses the printf() statements. (If I change the printf("...\n") to warn("...\n") then, IIRC, there's no such problem.) I'm not sure that I've ever struck this behaviour on a non-Windows system. Is this a bug that should be reported ? ... or merely a behaviour that no street savvy author would ever admit having encountered ? Cheers, Rob
Back to
Seekers of Perl Wisdom
|
|