Subject: | t/310_immutable_destroy.t depends on Moose, and fails if an old Moose is installed |
I have Moose 0.7 installed, and when I run the t/310_immutable_destroy.t
test, I get a test failure. Here's the output:
t/310_immutable_destroy.t ................. Class::MOP::subname is
deprecated. Please use Sub::Name directly. at
/usr/local/share/perl/5.10.0/Moose/Meta/TypeConstraint.pm line 248
Class::MOP::subname is deprecated. Please use Sub::Name directly. at
/usr/local/share/perl/5.10.0/Moose/Meta/TypeConstraint.pm line 248
Class::MOP::subname is deprecated. Please use Sub::Name directly. at
/usr/local/share/perl/5.10.0/Moose/Meta/TypeConstraint.pm line 235
Class::MOP::subname is deprecated. Please use Sub::Name directly. at
/usr/local/share/perl/5.10.0/Moose/Meta/TypeConstraint.pm line 235
Class::MOP::subname is deprecated. Please use Sub::Name directly. at
/usr/local/share/perl/5.10.0/Moose/Meta/TypeConstraint.pm line 235
Class::MOP::subname is deprecated. Please use Sub::Name directly. at
/usr/local/share/perl/5.10.0/Moose/Meta/TypeConstraint.pm line 235
t/310_immutable_destroy.t ................. 1/1
# Failed test 'Class::MOP::Class should not override an existing
DESTROY method'
# at t/310_immutable_destroy.t line 28.
# got: undef
# expected: 'SUSAN'
# Looks like you failed 1 test of 1.
t/310_immutable_destroy.t ................. Dubious, test returned 1
(wstat 256, 0x100)
Failed 1/1 subtests
Test Summary Report
-------------------
t/310_immutable_destroy.t (Wstat: 256 Tests: 1 Failed: 1)
Failed test: 1
Non-zero exit status: 1
Files=70, Tests=2140, 13 wallclock secs ( 0.92 usr 0.22 sys + 8.92
cusr 1.04 csys = 11.10 CPU)
Result: FAIL
Failed 1/70 test programs. 1/2140 subtests failed.
make: *** [test_dynamic] Error 1
After some discussion in #moose, a recommended fix is to add a version
requirement to the 'use Moose' call.
A better fix for the long term may be to not have any CMOP tests depend
on Moose.