Browse files was moved during a recent directory restructuring. The test

report generator did not know where to find it, so it silently
reported an empty-versioned POE.  This change moves the POE module
load before tests, and makes it a fatal error if POE can't be loaded.
It also includes the new library directory, so POE can be loaded.
This should resolve RT ticket 6143.
  • Loading branch information...
1 parent 9ff852d commit 8c890d135af742489bf99ec865c326859ded5109 @rcaputo committed Jun 4, 2004
Showing with 11 additions and 8 deletions.
  1. +11 −8 mylib/
@@ -21,7 +21,7 @@ =head1 AUTHOR
package My::Strap;
-use lib qw(../mylib ../ ./mylib ./);
+use lib qw(../mylib ../ ./mylib ./ ../lib ./lib);
use Test::Harness;
use base qw(Test::Harness::Straps);
use Sys::Hostname;
@@ -111,6 +111,12 @@ sub _print {
+# Require POE early, so we don't bother with the tests if something
+# catastrophic has occurred (like POE's library directory moves
+# outside C<use lib> or something). The version number is still
+# dumped into the XML file at the appropriate time.
+require POE;
my %test_results;
my $width = Test::Harness::_leader_width(@test_files);
foreach my $file (@test_files) {
@@ -176,13 +182,10 @@ sub _print {
$xml .= "\t<perl_modules>\n";
$xml .= "\t\t<perl version=\"$]\" />\n";
-eval "require POE;";
-if($@) {
- $xml .= "\t\t<poe />\n";
-} else {
- $xml .= "\t\t<poe version=\"$POE::VERSION\" />\n";
+# Dump POE's version. POE has been required earlier, without an
+# eval() wrapper, so the version must be available by this time.
+$xml .= "\t\t<poe version=\"$POE::VERSION\" />\n";
eval "use Gtk;";
if($@) {
$xml .= "\t\t<gtk />\n";

0 comments on commit 8c890d1

Please sign in to comment.