Skip Menu |

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

Report information
The Basics
Id: 132639
Status: resolved
Priority: 0/
Queue: Module-Generic

People
Owner: JDEGUEST [...] cpan.org
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: v0.12.2
Fixed in: v0.12.5



Subject: Couldn't find declarator 'try'
The test suite fails: ... Output from '/usr/bin/make test': PERL_DL_NONLAZY=1 "/usr/local/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t # Failed test 'use Module::Generic;' # at t/00.load.t line 4. # Tried to use 'Module::Generic'. # Error: Couldn't find declarator 'try' at /home/cpansand/.cpan/build/2020051602/Devel-Declare-0.006022-0/blib/lib/Devel/Declare/Context/Simple.pm line 47. # Devel::Declare::Context::Simple::skip_declarator(TryCatch=HASH(0x803c70dc8)) called at /home/cpansand/.cpan/build/2020051602/TryCatch-1.003002-0/blib/lib/TryCatch.pm line 83 # TryCatch::_parse_try("TryCatch", "Module::Generic::Number", "try", 8) called at /home/cpansand/.cpan/build/2020051602/TryCatch-1.003002-0/blib/lib/TryCatch.pm line 44 # TryCatch::__ANON__("try", 8) called at /home/cpansand/.cpan/build/2020051602/Devel-Declare-0.006022-0/blib/lib/Devel/Declare.pm line 277 # Devel::Declare::linestr_callback("const", "try", 8) called at /usr/home/cpansand/.cpan/build/2020051602/Module-Generic-v0.12.2-0/blib/lib/Module/Generic.pm line 4601 # require Module/Generic.pm called at t/00.load.t line 4 # main::BEGIN() called at /usr/home/cpansand/.cpan/build/2020051602/Module-Generic-v0.12.2-0/blib/lib/Module/Generic.pm line 4601 # eval {...} called at /usr/home/cpansand/.cpan/build/2020051602/Module-Generic-v0.12.2-0/blib/lib/Module/Generic.pm line 4601 # eval 'package main; # BEGIN { ${^WARNING_BITS} = $args[-1] if defined $args[-1] } # #line 4 t/00.load.t # use Module::Generic @{$args[0]}; # 1; # ' called at /usr/local/lib/perl5/5.30/Test/More.pm line 1034 # Test::More::_eval("package main;\x{a}BEGIN { \${^WARNING_BITS} = \$args[-1] if defined"..., ARRAY(0x80185f0a8), undef) called at /usr/local/lib/perl5/5.30/Test/More.pm line 1009 # Test::More::use_ok("Module::Generic") called at t/00.load.t line 4 # main::BEGIN() called at /usr/home/cpansand/.cpan/build/2020051602/Module-Generic-v0.12.2-0/blib/lib/Module/Generic.pm line 4601 # eval {...} called at /usr/home/cpansand/.cpan/build/2020051602/Module-Generic-v0.12.2-0/blib/lib/Module/Generic.pm line 4601 # Compilation failed in require at t/00.load.t line 4. # BEGIN failed--compilation aborted at t/00.load.t line 4. # Looks like you failed 1 test of 1. t/00.load.t .... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests ... etc ... Maybe this happens only with newer Devel::Declare versions and could be related to https://rt.cpan.org/Ticket/Display.html?id=131226
On 2020-05-16 02:02:46, SREZIC wrote: Show quoted text
> The test suite fails: > > ... > Output from '/usr/bin/make test': > > PERL_DL_NONLAZY=1 "/usr/local/bin/perl" "-MExtUtils::Command::MM" "- > MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, > 'blib/lib', 'blib/arch')" t/*.t > > # Failed test 'use Module::Generic;' > # at t/00.load.t line 4. > # Tried to use 'Module::Generic'. > # Error: Couldn't find declarator 'try' at > /home/cpansand/.cpan/build/2020051602/Devel-Declare-0.006022- > 0/blib/lib/Devel/Declare/Context/Simple.pm line 47. > # > Devel::Declare::Context::Simple::skip_declarator(TryCatch=HASH(0x803c70dc8)) > called at /home/cpansand/.cpan/build/2020051602/TryCatch-1.003002- > 0/blib/lib/TryCatch.pm line 83 > # TryCatch::_parse_try("TryCatch", "Module::Generic::Number", > "try", 8) called at /home/cpansand/.cpan/build/2020051602/TryCatch- > 1.003002-0/blib/lib/TryCatch.pm line 44 > # TryCatch::__ANON__("try", 8) called at > /home/cpansand/.cpan/build/2020051602/Devel-Declare-0.006022- > 0/blib/lib/Devel/Declare.pm line 277 > # Devel::Declare::linestr_callback("const", "try", 8) called at > /usr/home/cpansand/.cpan/build/2020051602/Module-Generic-v0.12.2- > 0/blib/lib/Module/Generic.pm line 4601 > # require Module/Generic.pm called at t/00.load.t line 4 > # main::BEGIN() called at > /usr/home/cpansand/.cpan/build/2020051602/Module-Generic-v0.12.2- > 0/blib/lib/Module/Generic.pm line 4601 > # eval {...} called at > /usr/home/cpansand/.cpan/build/2020051602/Module-Generic-v0.12.2- > 0/blib/lib/Module/Generic.pm line 4601 > # eval 'package main; > # BEGIN { ${^WARNING_BITS} = $args[-1] if defined $args[-1] } > # #line 4 t/00.load.t > # use Module::Generic @{$args[0]}; > # 1; > # ' called at /usr/local/lib/perl5/5.30/Test/More.pm line 1034 > # Test::More::_eval("package main;\x{a}BEGIN { \${^WARNING_BITS} > = \$args[-1] if defined"..., ARRAY(0x80185f0a8), undef) called at > /usr/local/lib/perl5/5.30/Test/More.pm line 1009 > # Test::More::use_ok("Module::Generic") called at t/00.load.t > line 4 > # main::BEGIN() called at > /usr/home/cpansand/.cpan/build/2020051602/Module-Generic-v0.12.2- > 0/blib/lib/Module/Generic.pm line 4601 > # eval {...} called at > /usr/home/cpansand/.cpan/build/2020051602/Module-Generic-v0.12.2- > 0/blib/lib/Module/Generic.pm line 4601 > # Compilation failed in require at t/00.load.t line 4. > # BEGIN failed--compilation aborted at t/00.load.t line 4. > # Looks like you failed 1 test of 1. > t/00.load.t .... > Dubious, test returned 1 (wstat 256, 0x100) > Failed 1/1 subtests > ... etc ... > > Maybe this happens only with newer Devel::Declare versions and could > be related to https://rt.cpan.org/Ticket/Display.html?id=131226
I see this comment: https://metacpan.org/source/JDEGUEST/Module-Generic-v0.12.4/Makefile.PL#L22 However, it's not reliably possible to specify a maximum version in a perl/CPAN installation (I can explain this if you like), so there needs to be another solution.
Subject: Re: [rt.cpan.org #132639] Couldn't find declarator 'try'
Date: Sun, 17 May 2020 06:46:52 +0900
To: bug-Module-Generic [...] rt.cpan.org
From: Jacques Deguest <jack [...] deguest.jp>
Thank you. This is a breaking change in version 0.006020 that I had not encountered until now. I contacted yesterday the owner of TryCatch to ask him if he was releasing an update and am waiting for his reply. Jacques On 17/05/2020 00:53, Slaven_Rezic via RT wrote: Show quoted text
> I see this comment: https://metacpan.org/source/JDEGUEST/Module-Generic-v0.12.4/Makefile.PL#L22 > However, it's not reliably possible to specify a maximum version in a perl/CPAN installation (I can explain this if you like), so there needs to be another solution.
Resolved with the use of Nice::Try