Skip Menu |

This queue is for tickets about the Moo CPAN distribution.

Report information
The Basics
Id: 87810
Status: resolved
Priority: 0/
Queue: Moo

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

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



Subject: Can't locate object method "new" via package "Method::Generate::DemolishAll"
Hello, I use last version of Starman He uses last version of Moo (1.003) And i use perl 5.16.2 I got tons a following errors or warnings in Starman's log: (in cleanup) Can't locate object method "new" via package "Method::Generate::DemolishAll" at /usr/local/lib/perl5/site_perl/5.16.2/Moo/Object.pm line 62, <$read> line 249912 during global destruction. I viewed a sources and there is new method in Moo::Base I don't understand this error May be do you know?
Some things don't work entirely as expected in global destruction. The problem in this case is that loading Method::Generate::DemolishAll during global destruction doesn't work correctly. I've been working on a fix for this issue, but I haven't decided on a solution yet. There is a test and a possible fix in the jenga-gd-kaboom branch.
I cloned git repo with this branch: $ perl Makefile.PL Writing Makefile for Moo Writing MYMETA.yml and MYMETA.json $ make test cp lib/oo.pm blib/lib/oo.pm cp lib/Moo/Conflicts.pm blib/lib/Moo/Conflicts.pm cp lib/Moo/_Utils.pm blib/lib/Moo/_Utils.pm cp lib/Sub/Defer.pm blib/lib/Sub/Defer.pm cp lib/Moo/Role.pm blib/lib/Moo/Role.pm cp lib/Moo.pm blib/lib/Moo.pm cp lib/Method/Generate/DemolishAll.pm blib/lib/Method/Generate/DemolishAll.pm cp lib/Method/Generate/Constructor.pm blib/lib/Method/Generate/Constructor.pm cp lib/Moo/Object.pm blib/lib/Moo/Object.pm cp lib/Method/Inliner.pm blib/lib/Method/Inliner.pm cp lib/Method/Generate/BuildAll.pm blib/lib/Method/Generate/BuildAll.pm cp lib/Moo/sification.pm blib/lib/Moo/sification.pm cp lib/Method/Generate/Accessor.pm blib/lib/Method/Generate/Accessor.pm cp lib/Moo/HandleMoose.pm blib/lib/Moo/HandleMoose.pm cp lib/Moo/_mro.pm blib/lib/Moo/_mro.pm cp lib/Moo/HandleMoose/FakeMetaClass.pm blib/lib/Moo/HandleMoose/FakeMetaClass.pm cp lib/Sub/Quote.pm blib/lib/Sub/Quote.pm cp bin/moo-outdated blib/script/moo-outdated /usr/local/bin/perl -MExtUtils::MY -e 'MY->fixin(shift)' -- blib/script/moo-outdated PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t xt/*.t t/accessor-coerce.t ........................................... strictures.pm extra testing active but couldn't load all modules. Missing were: indirect multidimensional bareword::filehandles Extra testing is auto-enabled in checkouts only, so if you're the author of a strictures-using module you need to run: cpan indirect multidimensional bareword::filehandles but these modules are not required by your users. t/accessor-coerce.t ........................................... ok t/accessor-default.t .......................................... strictures.pm extra testing active but couldn't load all modules. Missing were: indirect multidimensional bareword::filehandles Extra testing is auto-enabled in checkouts only, so if you're the author of a strictures-using module you need to run: cpan indirect multidimensional bareword::filehandles but these modules are not required by your users. t/accessor-default.t .......................................... ok t/accessor-generator-extension.t .............................. strictures.pm extra testing active but couldn't load all modules. Missing were: indirect multidimensional bareword::filehandles Extra testing is auto-enabled in checkouts only, so if you're the author of a strictures-using module you need to run: cpan indirect multidimensional bareword::filehandles .... Is it OK? I not tested in production this branch yet.
And final of make test: Can't locate Mouse.pm in @INC (@INC contains: /home/tubestore/Moo/blib/lib /home/tubestore/Moo/blib/arch /home/tubestore/perl5/lib/perl5/x86_64-linux-thread-multi /home/tubestore/perl5/lib/perl5/x86_64-linux-thread-multi /home/tubestore/perl5/lib/perl5 /home/tubestore/perl5/lib/perl5/x86_64-linux-thread-multi /home/tubestore/perl5/lib/perl5 /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.16.2 /usr/local/lib/perl5/5.16.2/x86_64-linux-thread-multi /usr/local/lib/perl5/5.16.2 .) at xt/super-jenga.t line 7. BEGIN failed--compilation aborted at xt/super-jenga.t line 7. xt/super-jenga.t .............................................. Dubious, test returned 2 (wstat 512, 0x200) No subtests run xt/test-my-dependents.t ....................................... skipped: This test will not run unless you set MOO_TEST_MD to a true value. xt/withautoclean.t ............................................ 1/? # Failed test 'use withautoclean::Class;' # at xt/withautoclean.t line 7. # Tried to use 'withautoclean::Class'. # Error: Can't locate namespace/autoclean.pm in @INC (@INC contains: /home/tubestore/Moo/xt/lib /home/tubestore/Moo/blib/lib /home/tubestore/Moo/blib/arch /home/tubestore/perl5/lib/perl5/x86_64-linux-thread-multi /home/tubestore/perl5/lib/perl5 /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.16.2 /usr/local/lib/perl5/5.16.2/x86_64-linux-thread-multi /usr/local/lib/perl5/5.16.2 .) at /home/tubestore/Moo/xt/lib/withautoclean/R1.pm line 7. # BEGIN failed--compilation aborted at /home/tubestore/Moo/xt/lib/withautoclean/R1.pm line 7. # Compilation failed in require at /usr/local/lib/perl5/site_perl/5.16.2/Module/Runtime.pm line 317. # Compilation failed in require at (eval 4) line 2. # BEGIN failed--compilation aborted at (eval 4) line 2. # Looks like you failed 1 test of 1. xt/withautoclean.t ............................................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests Test Summary Report ------------------- xt/global-destruct-jenga.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 xt/moo-consume-moose-role-coerce.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moo-consume-mouse-role-coerce.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moo-does-moose-role.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moo-role-types.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moo-roles-into-moose-class-attr-override-with-autoclean.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moo-roles-into-moose-class.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moose-autoclean-lazy-attr-builders.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moox-types.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/super-jenga.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/withautoclean.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=80, Tests=750, 15 wallclock secs ( 0.41 usr 0.11 sys + 12.28 cusr 0.96 csys = 13.76 CPU) Result: FAIL Failed 11/80 test programs. 2/750 subtests failed. make: *** [test_dynamic] Ошибка 1
But i tried the 'master' branch and i got same errors But the final of 'make test' few differents: xt/test-my-dependents.t ....................................... skipped: This test will not run unless you set MOO_TEST_MD to a true value. xt/withautoclean.t ............................................ 1/? # Failed test 'use withautoclean::Class;' # at xt/withautoclean.t line 7. # Tried to use 'withautoclean::Class'. # Error: Can't locate namespace/autoclean.pm in @INC (@INC contains: /home/tubestore/Moo/xt/lib /home/tubestore/Moo/blib/lib /home/tubestore/Moo/blib/arch /home/tubestore/perl5/lib/perl5/x86_64-linux-thread-multi /home/tubestore/perl5/lib/perl5 /usr/local/lib/perl5/site_perl/5.16.2/x86_64-linux-thread-multi /usr/local/lib/perl5/site_perl/5.16.2 /usr/local/lib/perl5/5.16.2/x86_64-linux-thread-multi /usr/local/lib/perl5/5.16.2 .) at /home/tubestore/Moo/xt/lib/withautoclean/R1.pm line 7. # BEGIN failed--compilation aborted at /home/tubestore/Moo/xt/lib/withautoclean/R1.pm line 7. # Compilation failed in require at /usr/local/lib/perl5/site_perl/5.16.2/Module/Runtime.pm line 317. # Compilation failed in require at (eval 4) line 2. # BEGIN failed--compilation aborted at (eval 4) line 2. # Looks like you failed 1 test of 1. xt/withautoclean.t ............................................ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests Test Summary Report ------------------- xt/moo-consume-moose-role-coerce.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moo-consume-mouse-role-coerce.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moo-does-moose-role.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moo-role-types.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moo-roles-into-moose-class-attr-override-with-autoclean.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moo-roles-into-moose-class.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moose-autoclean-lazy-attr-builders.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/moox-types.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/super-jenga.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output xt/withautoclean.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 Files=79, Tests=749, 15 wallclock secs ( 0.37 usr 0.13 sys + 12.46 cusr 1.02 csys = 13.98 CPU) Result: FAIL Failed 10/79 test programs. 1/749 subtests failed. make: *** [test_dynamic] Ошибка 1
The author test require a number of extra modules. Here is the list: Class::XSAccessor indirect multidimensional bareword::filehandles Moose Mouse namespace::clean namespace::autoclean MooseX::Types::Common::Numeric
I will try to install soon and test again May be these modules should be added to Makefile.PL in %TEST_DEPS? perl Makefile.PL & make test is common command for makeing and test module. But this receipt doesn't work for your module. I don't know how could i install before this module through the cpanm - one does make test... :-/ Show quoted text
> Class::XSAccessor > indirect > multidimensional > bareword::filehandles > Moose > Mouse > namespace::clean > namespace::autoclean > MooseX::Types::Common::Numeric
Now i tried to force reinstall this module from 'root' through cpanm - everything was done fine (i am about standard distributive). I saw log file of cpanm - there all tests are passed. But if i do manual compiling and testing - i got same errors. I don't understand why it passed tests without these modules ;-/
Ok, i done tests and install your test branch I only did before: ---------- diff --git a/Makefile.PL b/Makefile.PL index b2ce550..177368d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,7 +4,7 @@ use 5.008001; use ExtUtils::MakeMaker; check_conflicts(); -(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; +(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml' || ( exists $ENV{PERL_STRICTURES_EXTRA} && $ENV{PERL_STRICTURES_EXTRA} == 0 ); my %CONFIGURE_DEPS = ( 'ExtUtils::MakeMaker' => 0, ---------- Then: PERL_STRICTURES_EXTRA=0 perl Makefile.PL PERL_STRICTURES_EXTRA=0 make test Now i don't see any more same errors. But i want to wait some hours to make sure And i think patch above should be applied because without it there no ways to make tests as not author :( (i didn't install your recommended modules)
The extra modules are only required when running the tests from a git checkout. They aren't needed for a standard CPAN install.
Hi, The jenga-gd-kaboom branch is OK It doesn't show these warnings. I tested in production starman server three days and there no warnings ;-) Thanks!
After looking more into some related issues, I've decided on an alternate fix for this. I've made the fix and merged it, so it will be included in the next release.
Fixed in Moo 1.003001.