Skip Menu |

This queue is for tickets about the Module-Pluggable CPAN distribution.

Report information
The Basics
Id: 23607
Status: resolved
Priority: 0/
Queue: Module-Pluggable

People
Owner: Nobody in particular
Requestors: ANDK [...] cpan.org
Cc: geoff [...] laxan.com
AdminCc:

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



Subject: Failing test
This is with Module-Pluggable-3.3 on a system that has thousands of modules installed: t/02works_taint............NOK 3/5 # Failed test 'is deeply' # at t/02works_taint.t line 20. # Structures begin differing at: # $got->[0] = 'Module::Pluggable::Fast' # $expected->[0] = 'Module::Pluggable::Object' t/02works_taint............NOK 5/5 # Failed test 'is deeply class' # at t/02works_taint.t line 29. # Structures begin differing at: # $got->[0] = 'Module::Pluggable::Fast' # $expected->[0] = 'Module::Pluggable::Object' # Looks like you failed 2 tests of 5. t/02works_taint............dubious Test returned status 2 (wstat 512, 0x200) DIED. FAILED tests 3, 5 Failed 2/5 tests, 60.00% okay Perl is current pleadperl at 29376. Let me know if I can provide further info.
From: GEOFFR [...] cpan.org
This appears to be failing because the test expects to find only one module in the Module::Pluggable::* namespace (namely the ::Object one supplied with it). It gets a different results because you also have the ::Fast module installed. There are a couple of others on CPAN which would produce the same problem. Attached is a diff which I think will, in almost all circumstances, created the correct @expected array to test against. It certainly makes the test pass for me with ::Fast installed.
Only in Module-Pluggable-3.3: Build Only in Module-Pluggable-3.3: _build Only in Module-Pluggable-3.3: blib Only in Module-Pluggable-3.3/t: .02works_taint.t.swp diff -ur Module-Pluggable-3.3.orig/t/02works_taint.t Module-Pluggable-3.3/t/02works_taint.t --- Module-Pluggable-3.3.orig/t/02works_taint.t 2006-11-24 15:43:38.000000000 +0000 +++ Module-Pluggable-3.3/t/02works_taint.t 2006-11-25 17:17:15.000000000 +0000 @@ -11,10 +11,24 @@ my $foo; ok($foo = MyTest->new()); -my @plugins; +# We expect one module to be found in this namespace, the ::Object one we +# provide, but there may be other such modules installed already. Add any +# known Module::Pluggable::* modules from CPAN which appear to be installed, +# and make sure they're in the right order. That is likely to produce the +# right result, but this may still fail if you've written your own modules +# in this namespace. my @expected = qw(Module::Pluggable::Object); -ok(@plugins = sort $foo->plugins); +for (qw(Module::Pluggable::Dependency + Module::Pluggable::Fast + Module::Pluggable::Ordered )) +{ + eval "use $_"; + push @expected, $_ unless $@; +} +@expected = sort @expected; +my @plugins; +ok(@plugins = sort $foo->plugins); is_deeply(\@plugins, \@expected, "is deeply");
I think this is fixed in 3.7 which is on its way to CPAN right now - sorry it took so long. Please let me know.
Fixed in 3.7 I think. Closing.