Jerome Quelin <[EMAIL PROTECTED]> writes: > hi there, > > i received fail reports for games::risk, a tk application, due to a > display which cannot be reached: > > http://nntp.x.perl.org/group/perl.cpan.testers/2481552 > http://nntp.x.perl.org/group/perl.cpan.testers/2476799 > http://nntp.x.perl.org/group/perl.cpan.testers/2470175 > http://nntp.x.perl.org/group/perl.cpan.testers/2472016 > > since the module is a gui application, then of course a missing x server > will result in a module error. > ==> what can be done to prevent those fail reports? >
I usually have something like this in my test files. my $top; BEGIN { if (!eval { $top = MainWindow->new }) { print "1..0 # skip cannot open DISPLAY\n"; CORE::exit; } } In Perl/Tk itself the detection is done before even running the test suites and the test suite is aborted, causing an UNKNOWN report (which is quite reasonable in my opinion). On the other hand, it would be nice if the professional cpan testers would always setup a display. It does not need to be a real one, a Xvfb would be sufficient. Regards, Slaven -- Slaven Rezic - slaven <at> rezic <dot> de tktimex - time recording tool http://sourceforge.net/projects/ptktools/