diff options
author | Yves Orton <demerphq@gmail.com> | 2022-08-29 15:28:38 +0200 |
---|---|---|
committer | Yves Orton <demerphq@gmail.com> | 2022-09-03 10:05:54 +0200 |
commit | 451a9a1260f66bc37e4e7187d4368bca92540a8e (patch) | |
tree | e586820aeeaeca58a7fd278b328408b8006f4f9b /t/op | |
parent | 69bc7167fa24b1e8d3f810ce465d84bdddf413f6 (diff) | |
download | perl-451a9a1260f66bc37e4e7187d4368bca92540a8e.tar.gz |
op.c - work around Module::Install::DSL issue
This converts INIT {} blocks from the Module::Install::DSL
namespace into BEGIN blocks. This works around the bug reported in
GH Issue #16300. (Hopefully, not fully tested yet.) Which in turn
should allow us to close the bug in #2754.
See also PR: #20168 and Issue: #20161 both of which are blocked by
this.
Diffstat (limited to 't/op')
-rw-r--r-- | t/op/blocks.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/op/blocks.t b/t/op/blocks.t index 10fc83fa4b..102f1884b3 100644 --- a/t/op/blocks.t +++ b/t/op/blocks.t @@ -6,7 +6,7 @@ BEGIN { set_up_inc('../lib'); } -plan tests => 22; +plan tests => 23; my @expect = qw( b1 @@ -265,3 +265,7 @@ TODO: { fresh_perl_is('eval "BEGIN {goto end}"; end:', '', {}, 'RT #113934: goto out of BEGIN causes assertion failure'); +fresh_perl_is('package Module::Install::DSL; BEGIN { eval "INIT { print q(INIT fired in eval) }" }', + "Treating Module::Install::DSL::INIT block as BEGIN block as workaround at (eval 1) line 1.\n" + ."INIT fired in eval", {}, + 'GH Issue #16300: Module::Install::DSL workaround'); |