On Sun Jun 15 17:27:09 2008, ANDK wrote:
Show quoted text> Today I saw this in my smoker:
>
> t/44_upgrade_db...................Can't locate FileHandle/Fmode.pm in
> @INC (@INC contains:
> /home/sand/.cpan/build/DBM-Deep-1.0013-7uVsiC/blib/lib
> /home/sand/.cpan/build/DBM-Deep-1.0013-7uVsiC/blib/arch
> /home/src/perl/repoperls/installed-perls/perl/pkidIAS/perl-
> 5.10.0@34053/lib/5.11.0/i686-linux-64int
> /home/src/perl/repoperls/installed-perls/perl/pkidIAS/perl-
> 5.10.0@34053/lib/5.11.0
> /home/src/perl/repoperls/installed-perls/perl/pkidIAS/perl-
> 5.10.0@34053/lib/site_perl/5.11.0/i686-linux-64int
> /home/src/perl/repoperls/installed-perls/perl/pkidIAS/perl-
> 5.10.0@34053/lib/site_perl/5.11.0
> .) at t/44_upgrade_db.t line 16.
> BEGIN failed--compilation aborted at t/44_upgrade_db.t line 16.
> Dubious, test returned 2 (wstat 512, 0x200)
> No subtests run
>
>
Actually, the problem isn't that there is a missing dependency. This test is supposed to
skip_all if FileHandle::Fmode isn't installed. The problem is that it uses block eval's instead
of string eval's. The following changes get the test to pass.
--- t/44_upgrade_db.t.old 2008-07-03 06:06:25.000000000 -0500
+++ t/44_upgrade_db.t 2008-07-03 06:20:17.000000000 -0500
@@ -11,9 +11,9 @@
if ( $^O =~ /bsd/i );
my @failures;
- eval { use Pod::Usage 1.3; }; push @failures, 'Pod::Usage' if $@;
- eval { use IO::Scalar; }; push @failures, 'IO::Scalar' if $@;
- eval { use FileHandle::Fmode; }; push @failures, 'FileHandle::Fmode' if $@;
+ eval " use Pod::Usage 1.3; "; push @failures, 'Pod::Usage' if $@;
+ eval " use IO::Scalar; "; push @failures, 'IO::Scalar' if $@;
+ eval " use FileHandle::Fmode; "; push @failures, 'FileHandle::Fmode' if $@;
if ( @failures ) {
my $missing = join ',', @failures;
plan skip_all => "'$missing' must be installed to run these tests";