Skip Menu |

This queue is for tickets about the Class-C3 CPAN distribution.

Report information
The Basics
Id: 88044
Status: resolved
Priority: 0/
Queue: Class-C3

People
Owner: Nobody in particular
Requestors: dhorne [...] cpan.org
Cc:
AdminCc:

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



Subject: Tests fail when invoking Moo
Hi, I'm trying to install Class::C3 on Windows, Strawberry Perl 5.16.3 Many of the tests fail with String found where operator expected at C:/perl/perl/site/lib/Moo.pm line 18, near "_install_coderef "${target}::${name}"" For example: prove -Ilib -v t\04_MRO.t t\04_MRO.t .. 1..2 ok 1 - use c3; String found where operator expected at C:/perl/perl/site/lib/Moo.pm line 18, near "_install_coderef "${target}::${name}"" Compilation failed in require at ../base.pm line 14. BEGIN failed--compilation aborted at ../base.pm line 14. Compilation failed in require at t\04_MRO.t line 45. BEGIN failed--compilation aborted at t\04_MRO.t line 45. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/2 subtests Test Summary Report ------------------- t\04_MRO.t (Wstat: 65280 Tests: 1 Failed: 0) Non-zero exit status: 255 Parse errors: Bad plan. You planned 2 tests but ran 1. Files=1, Tests=1, 0 wallclock secs ( 0.05 usr + 0.03 sys = 0.08 CPU) Result: FAIL I upgraded Moo to version 1.0030000, but this has not fixed the problem. It's not clear to me whether there is a problem with Moo, or with Class::C3. If someone can advise, I'd be happy to log this with Moo if it's more appropriate, but I'd need some guidance as to what to report
Ok, I figured this out. The tests that fail all include the parent directory (..) in the path. E.g. t\04_MRO.t line 9: use lib 'opt', '../opt', '..'; Even though Class::C3 is untarred into its own directory, unrelated modules in the parent directory were being invoked. As soon as all of these modules were deleted, the tests passed. This leads me to wonder whether ".." should be included in the library path.
On Fri Aug 23 00:54:36 2013, DHORNE wrote: Show quoted text
> Ok, I figured this out. The tests that fail all include the parent > directory (..) in the path. E.g. > > t\04_MRO.t > line 9: use lib 'opt', '../opt', '..'; > > Even though Class::C3 is untarred into its own directory, unrelated > modules in the parent directory were being invoked. > > As soon as all of these modules were deleted, the tests passed. > > This leads me to wonder whether ".." should be included in the library > path.
Having those extra paths in the lib path is a bad idea, so I've removed them. This will be fixed whenever this module gets its next release.
This was resolved in 0.26.